Submission #81866

# Submission time Handle Problem Language Result Execution time Memory
81866 2018-10-27T12:22:58 Z Ort Nadan (COCI18_nadan) C
10 / 50
2 ms 468 KB
#include<stdio.h>

int main()
{
	int k, n, i; int sum = 0;
	scanf("%d", &k); scanf("%d", &n);
	for(i=1;i<n;i++) sum += i;
	printf("%d\n", (k-sum));
	for(i=1;i<n;i++) printf("%d\n", i);
	return 0;
}

Compilation message

nadan.c: In function 'main':
nadan.c:6:2: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &k); scanf("%d", &n);
  ^~~~~~~~~~~~~~~
nadan.c:6:19: warning: ignoring return value of 'scanf', declared with attribute warn_unused_result [-Wunused-result]
  scanf("%d", &k); scanf("%d", &n);
                   ^~~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 2 ms 376 KB Output isn't correct
2 Incorrect 2 ms 384 KB Output isn't correct
3 Incorrect 2 ms 384 KB Output isn't correct
4 Correct 2 ms 384 KB Output is correct
5 Incorrect 2 ms 384 KB Output isn't correct
6 Incorrect 2 ms 464 KB Output isn't correct
7 Incorrect 2 ms 468 KB Output isn't correct
8 Correct 2 ms 468 KB Output is correct
9 Incorrect 2 ms 468 KB Output isn't correct
10 Incorrect 2 ms 468 KB Output isn't correct