Wrong Answer
Code
#include<bits/stdc++.h>
using namespace std;
typedef unsigned long long ll;
int main() {
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int t;
cin >> t;
while (t--)
{
ll A,B,count=0;
cin >> A >> B;
while(A<B){
if((A*2)<=B){
A=A*2;
count++;
}
else{
count += B - A;
A = B;
}
}
cout << count << endl;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1044 Add or multiple
- Contest
- TLE_Headquarters - round #1
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-03-27 18:29:34
- Judged At
- 2024-11-11 03:37:07
- Judged By
- Score
- 20
- Total Time
- 2ms
- Peak Memory
- 336.0 KiB