본문 바로가기

Programming [Python]/백준 알고리즘 솔루션

#47 백준 파이썬 [2292] 벌집

https://www.acmicpc.net/submit/2292




#Solution


room = int(input())

if room == 1:
print(1)
else:
num = 1
answer = 1

while room >= 2:
room -= num * 6
num += 1
answer += 1

print(answer)