# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
81853 | jvalsortav | Nadan (COCI18_nadan) | C++14 | 2 ms | 628 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 <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <cctype>
#include <ctime>
using namespace std;
int n, k, x;
int main() {
cin >> k;
cin >> n;
x = 1;
while (n-1){
if (k <= 0){
break;
}
cout << x << endl;
k += -x;
x++;
n--;
}
if (k > 0){
cout << k;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |