#include <bits/stdc++.h>
#define ll long long
#define pb push_back
using namespace std;
int n,a,b;
int dizi[500005],dizi2[500005],dizi3[500005];
vector<int> v;
int main()
{
cin>>a>>b;
int dgr=1;
int sum=0;
for (int i=0;i<b-1;i++)
{
cout<<dgr<<endl;
sum+=dgr;
dgr++;
}
cout<<a-sum;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
204 KB |
Output is correct |
2 |
Correct |
1 ms |
204 KB |
Output is correct |
3 |
Correct |
0 ms |
204 KB |
Output is correct |
4 |
Correct |
0 ms |
204 KB |
Output is correct |
5 |
Correct |
1 ms |
204 KB |
Output is correct |
6 |
Correct |
1 ms |
204 KB |
Output is correct |
7 |
Correct |
1 ms |
204 KB |
Output is correct |
8 |
Correct |
0 ms |
204 KB |
Output is correct |
9 |
Correct |
1 ms |
204 KB |
Output is correct |
10 |
Correct |
1 ms |
204 KB |
Output is correct |