# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
81855 | BabinSinko | Nadan (COCI18_nadan) | C++14 | 3 ms | 732 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <iostream>
#include <cctype>
using namespace std;
int k, n, x[103], f, i,j;
int main() {
cin >> k >> n;
f = k;
while (f > 0){
x[i+j] += 1;
f = f-1;
i += 1;
if (i >= n){
i = 0;
j = j + 1;
}
}
for (int i = 0; i < (n-1); i++){
cout << x[i] << endl;
f = f + x[i];
}
cout << k - f;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |