-Code
n = int(input())
pyramid = 0
res = 0
cnt = 1
while 1:
pyramid += cnt ** 2
cnt += 2
if pyramid > n:
break
res += 1
print(res)
'Beakjoon&프로그래머스 > 파이썬' 카테고리의 다른 글
[백준/파이썬] 24603번 Scaling Recipe (0) | 2023.03.30 |
---|---|
[백준/파이썬] 25813번 Changing Strings (0) | 2023.03.29 |
[백준/파이썬] 27918번 탁구 경기 (0) | 2023.03.27 |
[백준/파이썬] 27890번 특별한 작은 분수 (0) | 2023.03.26 |
[백준/파이썬] 5292번 Counting Swann’s Coins (0) | 2023.03.25 |