Wrong Answer
Code
/*CODED BY mahmudulsakib2019
DATE:-4/3/2024;TIME:-23:05 pm
BANGALDESH , SYLHET*/
#include <iostream>
using namespace std;
int main() {
int T;
cin >> T;
while (T--) {
unsigned long long a, b;
cin >> a >> b;
int count = 0;
while (a != 0 && b != 0) {
if (a > b) {
unsigned long long temp = a;
a = a % b;
count += temp / b;
} else {
unsigned long long temp = b;
b = b % a;
count += temp / a;
}
}
cout << count << endl;
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1029 Make it zero
- Contest
- Brain booster #2
- Language
- C++20 (G++ 13.2.0)
- Submit At
- 2024-03-06 16:33:13
- Judged At
- 2024-11-11 03:41:18
- Judged By
- Score
- 50
- Total Time
- 4ms
- Peak Memory
- 552.0 KiB