← Back to List
6780번: Sumac Sequences ↗
Solutions
Python 3
85 B | 85 chars
L=[int(input()),int(input())] while L[-2]>=L[-1]: L.append(L[-2]-L[-1]) print(len(L))