제출 #855671

#제출 시각아이디문제언어결과실행 시간메모리
855671vjudge1Nadan (COCI18_nadan)C++17
50 / 50
1 ms348 KiB
#ifndef Local
    #pragma GCC optimize("O3,unroll-loops")
    #pragma GCC target("avx2,bmi,bmi2,lzcnt,popcnt")
#endif
#include <bits/stdc++.h>
#define int long long
#define pb push_back
#define lim 100000
using namespace std;
const int mod=1000000007ll;

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

signed main(){
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);cout.tie(NULL);
#ifdef Local  
    freopen("in","r",stdin);
    freopen("out","w",stdout);
#endif
    int t=1;
    //cin>>t;
    while (t--)
    {
        solve();
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...