Submission #651694

# Submission time Handle Problem Language Result Execution time Memory
651694 2022-10-19T19:19:19 Z ktkerem Nadan (COCI18_nadan) C++17
50 / 50
1 ms 324 KB
#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();
    }
}
# Verdict Execution time Memory 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