# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
573523 | Bana_Ashoor7777 | Nadan (COCI18_nadan) | C++14 | 1 ms | 300 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;
vector <ll> v;
vector <ll> v1;
vector <ll> v2;
int main()
{
ll k,n;
cin>>k>>n;
ll a[n]={0};
ll sum=0;
for(int i=0;i<n;i++)
{
if(i==n-1)
a[i]=k-sum;
else
{
a[i]=i+1;
sum+=i+1;
}
}
for(int i=0;i<n;i++)
cout<<a[i]<<endl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |