# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
143818 | nicolaalexandra | Kotrljanje (COCI18_kotrljanje) | C++14 | 185 ms | 51756 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;
//ifstream cin ("date.in");
//ofstream cout ("date.out");
int c,d,b,m;
vector <int> v[1000000];
int main (){
cin>>c>>d>>b>>m;
for (int nr=0;;nr+=(b-1)){
int val = c*nr+d;
int aux = val, sum = 0;
while (aux){
sum += aux%b;
aux /= b;
}
v[sum].push_back(nr);
if (v[sum].size() == m){
for (int i=0;i<v[sum].size();i++)
cout<<v[sum][i]<<" ";
return 0;
}}
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... |