Submission #521217

# Submission time Handle Problem Language Result Execution time Memory
521217 2022-02-01T08:26:59 Z KoD Nadan (COCI18_nadan) C++17
50 / 50
1 ms 204 KB
#include <bits/stdc++.h>

using std::vector;
using std::array;
using std::pair;
using std::tuple;

int main() {
    std::ios_base::sync_with_stdio(false);
    std::cin.tie(nullptr);
    int K, N;
    std::cin >> K >> N;
    for (int i = 0; i < N - 1; ++i) {
        std::cout << i + 1 << ' ';
        K -= i + 1;
    }    
    std::cout << K << '\n';
    return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 204 KB Output is correct
2 Correct 1 ms 204 KB Output is correct
3 Correct 0 ms 204 KB Output is correct
4 Correct 0 ms 204 KB Output is correct
5 Correct 1 ms 204 KB Output is correct
6 Correct 1 ms 204 KB Output is correct
7 Correct 0 ms 204 KB Output is correct
8 Correct 0 ms 204 KB Output is correct
9 Correct 0 ms 204 KB Output is correct
10 Correct 1 ms 204 KB Output is correct