답안 #124492

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
124492 2019-07-03T12:12:55 Z andreiomd Nadan (COCI18_nadan) C++11
50 / 50
2 ms 420 KB
#include <iostream>

using namespace std;

const int NMAX = 1e2 + 5;

int K, N, A[NMAX];

int main()
{
    ios_base :: sync_with_stdio(false);

    cin.tie(NULL);

    cin >> K >> N;

    for(int i = 1; i < N; ++i)
        A[i] = i;

    A[N] = K - ((N - 1) * N) / 2;

    for(int i = 1; i <= N; ++i)
        cout << A[i] << '\n';

    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Correct 2 ms 380 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 412 KB Output is correct
4 Correct 2 ms 376 KB Output is correct
5 Correct 2 ms 376 KB Output is correct
6 Correct 2 ms 296 KB Output is correct
7 Correct 2 ms 376 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 420 KB Output is correct
10 Correct 2 ms 376 KB Output is correct