Time Exceeded
Code
#include <stdio.h>
int main(){
unsigned long long int a,b;
int n;
scanf("%d",&n);
for (int i = 0; i < n; i++){
scanf("%llu %llu",&a,&b);
unsigned long long int count = 0;
while (a != 0 && b != 0){
if (a > b){
a = a - b;
count++;
}
else{
b = b - a;
count++;
}
}
printf("%llu\n",count);
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1029 Make it zero
- Contest
- Brain booster #2
- Language
- C11 (GCC 13.2.0)
- Submit At
- 2024-03-06 16:40:44
- Judged At
- 2024-11-11 03:41:13
- Judged By
- Score
- 50
- Total Time
- ≥1086ms
- Peak Memory
- ≥432.0 KiB