# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
145462 | youssan_william | Nadan (COCI18_nadan) | C++14 | 3 ms | 376 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;
typedef long long ll;
int main()
{
ll n , k;
cin >> n >> k ;
ll x=1;
while(k)
{
if(k==1)
{
cout<<n << "\n";
break;
}
cout << x << "\n";
n-=x;
x++;
k--;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |