[백준] 2292번 벌집 풀이

SongKS·2020년 7월 6일
0

백준 알고리즘

목록 보기
3/7

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

cnt = 1
count = 1
cnt_six = 6
input = int(input())
if input == 1:
    print("1")
else:
    while input > cnt:
        count += 1
        cnt += cnt_six
        cnt_six += 6
    print(count)
profile
백엔드와 프론트, DevOps 사이에 표류하는 개발자

0개의 댓글