QOJ.ac

QOJ

ID题目提交者结果用时内存语言文件大小提交时间测评时间
#665900#6558. Allergen TestingdeepthoughtWA 2ms3788kbC++23374b2024-10-22 15:46:552024-10-22 15:47:18

Judging History

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

  • [2024-10-22 15:47:18]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3788kb
  • [2024-10-22 15:46:55]
  • 提交

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 = 0;
        if(n > 1) x = log2(n - 1) + 1;
        int ans = ceil((double)x / d);
        cout << ans << '\n';
    }

}

詳細信息

Test #1:

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

input:

1
4 1

output:

2

result:

ok single line: '2'

Test #2:

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

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:

0
60
0
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 5th lines differ - expected: '2', found: '1'