# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
145020 | alexandra_udristoiu | Kotrljanje (COCI18_kotrljanje) | C++14 | 1107 ms | 18472 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |