Agorithm/백준 알고리즘

백준 알고리즘 6794번 What is n, Daddy?(python)

kimjinho1 2021. 2. 18. 02:13
728x90
반응형

단순 구현 문제이다.

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