#include <iostream>
using namespace std;
int K,N,A[100];
int main()
{
cin.tie(0); ios_base::sync_with_stdio(0);
cin>>K>>N;
for (int i=1;i<=N;i++) {
A[i]=i;
K-=i;
}
A[N]+=K;
for (int i=1;i<=N;i++) cout<<A[i]<<endl;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
2 ms |
376 KB |
Output is correct |
2 |
Correct |
2 ms |
376 KB |
Output is correct |
3 |
Correct |
2 ms |
400 KB |
Output is correct |
4 |
Correct |
2 ms |
480 KB |
Output is correct |
5 |
Correct |
2 ms |
500 KB |
Output is correct |
6 |
Correct |
2 ms |
560 KB |
Output is correct |
7 |
Correct |
2 ms |
636 KB |
Output is correct |
8 |
Correct |
2 ms |
636 KB |
Output is correct |
9 |
Correct |
2 ms |
652 KB |
Output is correct |
10 |
Correct |
2 ms |
652 KB |
Output is correct |