import sys n=int(sys.stdin.readline().strip()) tmp=1 cnt=1 while True: if tmp>=n: break tmp+=6*cnt cnt+=1 print(cnt)
문제에서 주어진 벌집 그림을 살펴보니 두칸을 거치는 번호는 2~6, 3칸을 거치는 번호는 8~19 이길래 tmp+=6*cnt라는 수식을 세울 수 있었다.