Submission #19718952
Source Code Expand
Copy
#include <bits/stdc++.h> using namespace std; typedef long long ll; int main(){ int r,g,b,n; cin >> r >> g >> b >> n; int ans = 0; for(int i = 0; i*r <= n; i++){ for(int j = 0; j * g <= n; j++){ int B = n - (j*g+i*r); if(B < 0) continue; if(B % b == 0) ans++; } } cout << ans << endl; }
Submission Info
Submission Time | |
---|---|
Task | B - RGB Boxes |
User | autumn_fish |
Language | C++ (GCC 9.2.1) |
Score | 200 |
Code Size | 381 Byte |
Status | AC |
Exec Time | 27 ms |
Memory | 3580 KB |
Judge Result
Set Name | Sample | All | ||||
---|---|---|---|---|---|---|
Score / Max Score | 0 / 0 | 200 / 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 | 6 ms | 3520 KB |
rand_02.txt | AC | 2 ms | 3404 KB |
rand_03.txt | AC | 2 ms | 3580 KB |
rand_04.txt | AC | 2 ms | 3348 KB |
rand_05.txt | AC | 2 ms | 3548 KB |
rand_06.txt | AC | 18 ms | 3480 KB |
rand_07.txt | AC | 2 ms | 3544 KB |
rand_08.txt | AC | 27 ms | 3520 KB |
rand_09.txt | AC | 2 ms | 3400 KB |
sample_01.txt | AC | 2 ms | 3348 KB |
sample_02.txt | AC | 5 ms | 3540 KB |