파이썬/백준

백준 1789번 : 수들의 합

채린.__. 2022. 10. 15. 00:24

 

[정답]

S = int(input())
i=1
while i*(i+1)/2 <= S:
    i+=1
else:
    print(i-1)