# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
253896 | Molukhyyeh | Nadan (COCI18_nadan) | C++14 | 1 ms | 384 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 <bits/stdc++.h>
using namespace std;
#define ll long long
#define all(x) x.begin(),x.end()
int const N = 200001;
int main(){
int n, k;
scanf("%d%d", &k, &n);
int i = 1;
while(i < n && k > 0){
printf("%d\n", i++);
k-=i;
}
printf("%d\n", k);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |