Time Exceeded
Code
n = int(input())
for i in range(n):
a,b = map(int,input().split())
count = 0
while (a != 0 and b != 0):
s1 = max(a,b)
if s1 == a:
a = a - b
count = count + 1
elif s1 == b:
b = b - a
count = count + 1
print(count)
Information
- Submit By
- Type
- Submission
- Problem
- P1029 Make it zero
- Contest
- Brain booster #2
- Language
- Python 3 (Python 3.12.3)
- Submit At
- 2024-03-06 15:34:42
- Judged At
- 2024-11-11 03:41:37
- Judged By
- Score
- 10
- Total Time
- ≥1044ms
- Peak Memory
- ≥3.125 MiB