Submission #5369643


Source Code Expand

Copy
R, G, B, N = list(map(int, input().split()))

cnt = 0
for r in range(N//R + 1):
    for g in range((N - r*R)//G + 1):
        if (N-r*R-g*G) % B == 0:
            cnt += 1

print(cnt)

Submission Info

Submission Time
Task B - RGB Boxes
User upura
Language Python3 (3.4.3)
Score 200
Code Size 193 Byte
Status
Exec Time 1534 ms
Memory 2940 KB

Test Cases

Set Name Score / Max Score Test Cases
Sample 0 / 0 sample_01.txt, sample_02.txt
All 200 / 200 rand_01.txt, rand_02.txt, rand_03.txt, rand_04.txt, rand_05.txt, rand_06.txt, rand_07.txt, rand_08.txt, rand_09.txt, sample_01.txt, sample_02.txt
Case Name Status Exec Time Memory
rand_01.txt 17 ms 2940 KB
rand_02.txt 17 ms 2940 KB
rand_03.txt 17 ms 2940 KB
rand_04.txt 18 ms 2940 KB
rand_05.txt 17 ms 2940 KB
rand_06.txt 1030 ms 2940 KB
rand_07.txt 17 ms 2940 KB
rand_08.txt 1534 ms 2940 KB
rand_09.txt 17 ms 2940 KB
sample_01.txt 17 ms 2940 KB
sample_02.txt 115 ms 2940 KB