/ SeriousOJ /

Record Detail

Time Exceeded


  
# Status Time Cost Memory Cost
#1 Accepted 1ms 536.0 KiB
#2 Accepted 1ms 536.0 KiB
#3 Accepted 8ms 548.0 KiB
#4 Accepted 6ms 544.0 KiB
#5 Accepted 4ms 512.0 KiB
#6 Accepted 58ms 544.0 KiB
#7 Time Exceeded ≥1096ms ≥320.0 KiB
#8 Time Exceeded ≥1089ms ≥324.0 KiB

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