QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#238514#6558. Allergen TestingElyesChaabouni#WA 1ms3320kbC++14677b2023-11-04 16:55:592023-11-04 16:56:00

Judging History

你现在查看的是最新测评结果

  • [2023-11-04 16:56:00]
  • 评测
  • 测评结果:WA
  • 用时:1ms
  • 内存:3320kb
  • [2023-11-04 16:55:59]
  • 提交

answer

#include<bits/stdc++.h>
#pragma GCC optimize("Ofast")
//#pragma GCC target ("avx2")
//#pragma GCC optimization ("O3")
//#pragma GCC optimization ("unroll-loops")
#define INV_2 499122177
#define INF 1000000000
#define PI 3.14159265358979323846
#define eps 1e-9
#define MOD1 998244353
#define MOD2 1000000007

using namespace std;

int main()
{
	ios::sync_with_stdio(0);cin.tie(0);cout.tie(0);
//	freopen("input.txt", "r", stdin);
//	freopen("output.txt", "w", stdout);
	int t;
	cin >> t;
	while(t--)
	{
		long long n, d;
		cin >> n >> d;
		n--;
		long long ans=0;
		while(n!=1)
		{
			ans++;
			n/=2;
		}
		cout << ans << '\n';
	}
}
//07-02-46

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 0
Wrong Answer
time: 1ms
memory: 3320kb

input:

1
4 1

output:

1

result:

wrong answer 1st lines differ - expected: '2', found: '1'