본문 바로가기
Beakjoon&프로그래머스/파이썬

[백준/파이썬] 6794번 What is n, Daddy?

by 현장 2022. 2. 6.

-코드

n = int(input())
cnt = 0
for i in range(6):
    for j in range(i, 6):
        if i + j == n:
            cnt += 1
print(cnt)

범위 때문에 한번 틀렸었습니다.