Submission #1356310

#TimeUsernameProblemLanguageResultExecution timeMemory
1356310luvwinterNadan (COCI18_nadan)C++20
10 / 50
0 ms344 KiB
#include<bits/stdc++.h>
using namespace std;
#define int long long
#define FOR(i , l , r) for(int i = (l) ; i <= (r) ; i++)

main () {
    int k , n; cin >> k >> n;
    int v = (k - n * (n + 1) / 2) / n;
    FOR(i , 0 , n - 2) {
        cout << v + i << endl;
        k -= (v + i);

    }
    cout << k;

}

Compilation message (stderr)

nadan.cpp:6:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
    6 | main () {
      | ^~~~
#Result Execution timeMemoryGrader output
Fetching results...