← Back to List

15989번: 1, 2, 3 더하기 4 ↗

Solutions

Python 3
166 B | 166 chars
for i in range(int(input())):
    N = int(input())
    ans = 0
    for three in range(0, N+1, 3):
        left = N - three
        ans += left // 2 + 1
    print(ans)