Skip to content

Commit 485358e

Browse files
Create 2169.py
1 parent 3b6ab55 commit 485358e

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

2001-2500/2169.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution:
2+
def countOperations(self, num1: int, num2: int) -> int:
3+
c = 0
4+
while num1!=0 and num2!=0:
5+
if num1>=num2:
6+
num1-=num2
7+
else:
8+
num2-=num1
9+
c+=1
10+
return c
11+

0 commit comments

Comments
 (0)