답안 #81865

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
81865 2018-10-27T12:21:05 Z Ort Nadan (COCI18_nadan) C
10 / 50
2 ms 556 KB
#include<stdio.h>

int main()
{
	int k, n, i; int sum = 0;
	scanf("%d", &k); scanf("%d", &n);
	sum = n*(n-1) / 2;
	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);
                   ^~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Incorrect 2 ms 256 KB Output isn't correct
2 Incorrect 2 ms 380 KB Output isn't correct
3 Incorrect 2 ms 552 KB Output isn't correct
4 Correct 2 ms 552 KB Output is correct
5 Incorrect 2 ms 556 KB Output isn't correct
6 Incorrect 2 ms 556 KB Output isn't correct
7 Incorrect 2 ms 556 KB Output isn't correct
8 Correct 2 ms 556 KB Output is correct
9 Incorrect 2 ms 556 KB Output isn't correct
10 Incorrect 2 ms 556 KB Output isn't correct