Submission #81855

# Submission time Handle Problem Language Result Execution time Memory
81855 2018-10-27T11:41:49 Z BabinSinko Nadan (COCI18_nadan) C++14
15 / 50
3 ms 732 KB
#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
1 Correct 2 ms 376 KB Output is correct
2 Incorrect 2 ms 380 KB Output isn't correct
3 Incorrect 2 ms 440 KB Output isn't correct
4 Correct 2 ms 456 KB Output is correct
5 Correct 2 ms 456 KB Output is correct
6 Runtime error 2 ms 456 KB Execution killed with signal 11 (could be triggered by violating memory limits)
7 Incorrect 2 ms 576 KB Output isn't correct
8 Runtime error 2 ms 660 KB Execution killed with signal 11 (could be triggered by violating memory limits)
9 Incorrect 2 ms 732 KB Output isn't correct
10 Runtime error 3 ms 732 KB Execution killed with signal 11 (could be triggered by violating memory limits)