본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬]6780번 Sumac Sequences

by 현장 2021. 4. 28.

-코드

t1 = int(input())
t2 = int(input())
r = 2
while t1 - t2 >= 0:
    sumac = t1 - t2
    t1 = t2
    t2 = sumac
    r += 1
print(r)