QOJ.ac

QOJ

IDProblemSubmitterResultTimeMemoryLanguageFile sizeSubmit timeJudge time
#706470#6558. Allergen Testingucup-team902#WA 2ms3856kbC++17326b2024-11-03 11:33:582024-11-03 11:33:59

Judging History

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

  • [2024-11-03 11:33:59]
  • 评测
  • 测评结果:WA
  • 用时:2ms
  • 内存:3856kb
  • [2024-11-03 11:33:58]
  • 提交

answer

#include<bits/stdc++.h>
using namespace std;
using ll=long long;
ll n,d;
void solve(){
    scanf("%lld %lld",&n,&d);
    if(n==1){
        puts("0");
        return;
    }
    n=(ll)log2(n-1)+1;
    printf("%lld\n",(n+d-1)/d);
}
int main(){
    int t; scanf("%d",&t);
    while(t--) solve();
    return 0;
}

Details

Tip: Click on the bar to expand more detailed information

Test #1:

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

input:

1
4 1

output:

2

result:

ok single line: '2'

Test #2:

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

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'