제출 #81855

#제출 시각아이디문제언어결과실행 시간메모리
81855BabinSinkoNadan (COCI18_nadan)C++14
15 / 50
3 ms732 KiB
#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 timeMemoryGrader output
Fetching results...