답안 #107462

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
107462 2019-04-24T15:45:49 Z Kalam Nadan (COCI18_nadan) C++14
50 / 50
3 ms 384 KB
// KALAM
# include<bits/stdc++.h>

using namespace std;

const int N = 50000 + 77;
int n , k;
int main() {
   scanf("%d %d" , & k , & n);
   for(int i = 1;i < n;++ i)
      printf("%d\n" , i);
   printf("%d\n" , k - (n - 1) * n / 2);
   return 0;
}

Compilation message

nadan.cpp: In function 'int main()':
nadan.cpp:9:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
    scanf("%d %d" , & k , & n);
    ~~~~~^~~~~~~~~~~~~~~~~~~~~
# 결과 실행 시간 메모리 Grader output
1 Correct 3 ms 384 KB Output is correct
2 Correct 2 ms 256 KB Output is correct
3 Correct 2 ms 384 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 128 KB Output is correct
6 Correct 2 ms 384 KB Output is correct
7 Correct 3 ms 384 KB Output is correct
8 Correct 2 ms 384 KB Output is correct
9 Correct 2 ms 384 KB Output is correct
10 Correct 3 ms 384 KB Output is correct