Wrong Answer
Code
#include <iostream>
using namespace std;
int main() {
int t;
cin >> t;
while (t--) {
long long a, b;
cin >> a >> b;
int operations = 0;
while (a != 0 && b != 0) {
a = abs(a - b);
b = min(a, b);
operations++;
}
cout << operations*2 << endl;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1029 Make it zero
- Contest
- Brain booster #2
- Language
- C++11 (G++ 13.2.0)
- Submit At
- 2024-03-06 15:50:32
- Judged At
- 2024-11-11 03:41:32
- Judged By
- Score
- 5
- Total Time
- 15ms
- Peak Memory
- 548.0 KiB