/ SeriousOJ /

Record Detail

Wrong Answer


  
# Status Time Cost Memory Cost
#1 Wrong Answer 1ms 588.0 KiB
#2 Wrong Answer 0ms 540.0 KiB

Code

#include <stdio.h>

int main() {
    int a, b;
    int count = 0;

    scanf("%d %d", &a, &b);

    while (a != 0 && b != 0) {
        if (a >= b) {
            count += a / b;
            a = a % b;
        } else {
            count += b / a;
            b = b % a;
        }
    }

    printf("%d\n", count);
    return 0;
}

Information

Submit By
Type
Submission
Problem
P1029 Make it zero
Language
C99 (GCC 13.2.0)
Submit At
2025-05-11 09:24:41
Judged At
2025-05-11 09:24:41
Judged By
Score
0
Total Time
1ms
Peak Memory
588.0 KiB