답안 #469864

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
469864 2021-09-02T07:15:25 Z watoKE Nadan (COCI18_nadan) C++17
10 / 50
1 ms 324 KB
#include <bits/stdc++.h>
#include<vector>
#define st first
#define nd second
#define ll long long



using namespace std;
int n,k,cvp,c,t,d,b;
vector<char> v[1005];

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

    return 0;

}

Compilation message

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