# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
145020 | 2019-08-18T12:37:59 Z | alexandra_udristoiu | Kotrljanje (COCI18_kotrljanje) | C++14 | 1107 ms | 18472 KB |
#include<iostream> #include<vector> using namespace std; long long c, d, b, m, i, x, s; int ff[100000]; vector<long long> v[100000]; int main(){ cin>> c >> d >> b >> m; for(i = 1; ; i++){ x = c * i * (b - 1) + d; s = 0; while(x != 0){ s += x % b; x /= b; } ff[s]++; v[s].push_back(i * (b - 1) ); if(ff[s] == m){ for(i = 0; i < v[s].size(); i++){ cout<< v[s][i] <<" "; } return 0; } } }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 5 ms | 2808 KB | Output is correct |
2 | Correct | 84 ms | 9252 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 68 ms | 7624 KB | Output is correct |
2 | Correct | 60 ms | 8036 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 58 ms | 7544 KB | Output is correct |
2 | Correct | 72 ms | 8420 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 64 ms | 8548 KB | Output is correct |
2 | Correct | 76 ms | 8064 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 65 ms | 8468 KB | Output is correct |
2 | Correct | 135 ms | 9064 KB | Output is correct |
3 | Correct | 84 ms | 8532 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 82 ms | 8792 KB | Output is correct |
2 | Correct | 68 ms | 8292 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 41 ms | 3576 KB | Output is correct |
2 | Correct | 435 ms | 9296 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 980 ms | 16808 KB | Output is correct |
2 | Correct | 677 ms | 18472 KB | Output is correct |
3 | Correct | 1107 ms | 18420 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 124 ms | 9976 KB | Output is correct |
2 | Correct | 541 ms | 14844 KB | Output is correct |
3 | Correct | 77 ms | 9088 KB | Output is correct |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 72 ms | 8284 KB | Output is correct |
2 | Correct | 64 ms | 7656 KB | Output is correct |