/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 2ms 328.0 KiB
#2 Wrong Answer 2ms 328.0 KiB

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 << 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:51:14
Judged At
2024-11-11 03:41:32
Judged By
Score
0
Total Time
2ms
Peak Memory
328.0 KiB