QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#665890#6558. Allergen TestingdeepthoughtWA 2ms3748kbC++23374b2024-10-22 15:45:272024-10-22 15:45:35

Judging History

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

  • [2024-10-22 15:45:35]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3748kb
  • [2024-10-22 15:45:27]
  • 提交

answer

#include <bits/stdc++.h>
using namespace std;
#define int long long


int32_t main(){
	ios_base::sync_with_stdio(0);
	cin.tie(0);
    
    int t;
    cin >> t;
    while(t--) {
        int n, d;
        cin >> n >> d;
        int x = 1;
        if(n > 1) x = log2(n - 1) + 1;
        int ans = ceil((double)x / d);
        cout << ans << '\n';
    }

}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

score: 100
Accepted
time: 0ms
memory: 3680kb

input:

1
4 1

output:

2

result:

ok single line: '2'

Test #2:

score: -100
Wrong Answer
time: 2ms
memory: 3748kb

input:

10000
1 1
1000000000000000000 1
1 1000000000000000000
1000000000000000000 1000000000000000000
26615519354743225 163142634
26615519354743225 163142634
26615519354743224 163142634
26615519354743226 163142634
847997831064072529 920867976
847997831064072529 920867976
847997831064072528 920867976
8479978...

output:

1
60
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1...

result:

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