[기본수학1] 벌집
2021. 2. 20. 11:56ㆍ백준
제출 코드
target = int(input())
now = 1
count = 1
while True:
if target <= now:
break
else:
now = 6*(count - 1) + now
count += 1
if count == 1:
print(1)
else:
print(count - 1)