답안 #312266

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
312266 2020-10-12T23:28:54 Z monus1042 Nadan (COCI18_nadan) C++17
50 / 50
1 ms 512 KB
// NK
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef pair<int,int> ii;
typedef vector<int> vi;
typedef vector<ii> vii;
typedef vector<ll> vll;
#define eb emplace_back
#define pb push_back
#define pob pop_back
#define psf push_front
#define pof pop_front
#define mkp make_pair
#define all(x) x.begin(), x.end()
#define Bolivia_is_nice ios::sync_with_stdio(false), cin.tie(nullptr)

void solve(){
  ll k; cin>>k;
  ll n; cin>>n;
  for (ll i=1; i<n; ++i){
    k-=i;
    cout<<i<<'\n';
  }
  cout<<k<<'\n';
}

int main(){
  Bolivia_is_nice;
  int t = 1; //cin>>t;
  while(t--)
    solve();
	
  return 0;
}
/*
  ~/.emacs
*/
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 384 KB Output is correct
2 Correct 0 ms 384 KB Output is correct
3 Correct 0 ms 384 KB Output is correct
4 Correct 0 ms 384 KB Output is correct
5 Correct 0 ms 512 KB Output is correct
6 Correct 1 ms 384 KB Output is correct
7 Correct 0 ms 384 KB Output is correct
8 Correct 1 ms 384 KB Output is correct
9 Correct 1 ms 384 KB Output is correct
10 Correct 1 ms 384 KB Output is correct