Time Exceeded
Code
#include<iostream>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--)
{
long int a,b;
cin>>a>>b;
int sum=0;
here:
if(a>b)
{
a=a-b;
sum++;
goto here;
}
else if(a<b)
{
b=b-a;
sum++;
goto here;
}
else if(a==b)
{
sum++;
cout<<sum<<endl;
}
}
return 0;
}
Information
- Submit By
- Type
- Submission
- Problem
- P1029 Make it zero
- Contest
- Brain booster #2
- Language
- C++17 (G++ 13.2.0)
- Submit At
- 2024-03-06 16:06:01
- Judged At
- 2024-11-11 03:41:26
- Judged By
- Score
- 50
- Total Time
- ≥1096ms
- Peak Memory
- ≥548.0 KiB