답안 #124481

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
124481 2019-07-03T12:01:51 Z andreiomd Nadan (COCI18_nadan) C++11
15 / 50
2 ms 376 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;

    int M = N * (N + 1);

    M /= 2;

    int X = K / M;

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

    int Diff = K - M * X;

    A[N] += Diff;

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

    return 0;
}
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Incorrect 2 ms 376 KB Output isn't correct
3 Incorrect 2 ms 376 KB Output isn't correct
4 Correct 2 ms 376 KB Output is correct
5 Incorrect 2 ms 256 KB Output isn't correct
6 Incorrect 2 ms 376 KB Output isn't correct
7 Incorrect 2 ms 256 KB Output isn't correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Incorrect 2 ms 376 KB Output isn't correct