Submission #19711194
Source Code Expand
Copy
R, G, B, N = map(int, input().split()) R_max = N // R G_max = N // G B_max = N // B ans = 0 for r in range(R_max+1): for g in range(G_max+1): Bb = N - R * r - G * g b = Bb // B b_ = Bb % B if b >= 0 and b_ == 0: ans += 1 #print(r, g, b) print(ans)
Submission Info
Submission Time | |
---|---|
Task | B - RGB Boxes |
User | ryuji1011 |
Language | Python (3.8.2) |
Score | 0 |
Code Size | 328 Byte |
Status | TLE |
Exec Time | 2205 ms |
Memory | 9108 KB |
Judge Result
Set Name | Sample | All | ||||||
---|---|---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 0 / 200 | ||||||
Status |
|
|
Set Name | Test Cases |
---|---|
Sample | sample_01.txt, sample_02.txt |
All | 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 | AC | 17 ms | 9108 KB |
rand_02.txt | AC | 18 ms | 9044 KB |
rand_03.txt | AC | 19 ms | 8996 KB |
rand_04.txt | AC | 21 ms | 9044 KB |
rand_05.txt | AC | 18 ms | 8888 KB |
rand_06.txt | TLE | 2171 ms | 8996 KB |
rand_07.txt | AC | 18 ms | 9048 KB |
rand_08.txt | TLE | 2205 ms | 8776 KB |
rand_09.txt | AC | 20 ms | 8896 KB |
sample_01.txt | AC | 20 ms | 9040 KB |
sample_02.txt | AC | 259 ms | 9048 KB |