#include<bits/stdc++.h>
typedef long long ll;
typedef std::pair<ll , ll> llll;
std::vector<ll> ar;
ll n;
void solve(){
ll k;std::cin >> k >> n;
for(ll i = 1;n>i;i++){
std::cout << i << "\n";
k-=i;
}
std::cout << k << "\n";
}
int main(){
std::ios_base::sync_with_stdio(false);std::cin.tie(NULL);
ll t = 1;
//std::cin >> t;
while(t--){
solve();
}
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
324 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
324 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
212 KB |
Output is correct |
9 |
Correct |
1 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
212 KB |
Output is correct |