Skip to content

Latest commit

 

History

History
30 lines (25 loc) · 558 Bytes

File metadata and controls

30 lines (25 loc) · 558 Bytes

백준 7113번 Rectangle

7113


소스코드

  • 메모리 : 29200 KB
  • 시간 : 64 ms
def cutting(n,m):
    global count
    if n > m: 
        count += (n // m)
        n %= m
    else: 
        count += (m // n)
        m %= n
    if n*m == 0:
        return count
    cutting(n,m)
    

n, m = map(int,input().split())
count = 0
cutting(n,m)
print(count)