Submission #94534

# Submission time Handle Problem Language Result Execution time Memory
94534 2019-01-20T04:29:19 Z YamiDust Nadan (COCI18_nadan) C++14
0 / 50
391 ms 37300 KB
#include <bits/stdc++.h>

using namespace std;

typedef long long ll;

int main () {
    #ifndef ONLINE_JUDGE
    freopen("input.txt","r",stdin);
    #endif // ONLINE_JUDGE
    int N,K;
    scanf("%d%d",&K,&N);
    for (int i=0;i<N-1;i++) {
        printf("%d\n",i+1);
        K-=i+1;
    }
    printf("%d\n",K);
    return 0;
}

Compilation message

nadan.cpp: In function 'int main()':
nadan.cpp:9:12: warning: ignoring return value of 'FILE* freopen(const char*, const char*, FILE*)', declared with attribute warn_unused_result [-Wunused-result]
     freopen("input.txt","r",stdin);
     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
nadan.cpp:12:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf("%d%d",&K,&N);
     ~~~~~^~~~~~~~~~~~~~
# Verdict Execution time Memory Grader output
1 Incorrect 390 ms 37076 KB Output isn't correct
2 Incorrect 384 ms 37232 KB Output isn't correct
3 Incorrect 391 ms 37240 KB Output isn't correct
4 Incorrect 384 ms 37212 KB Output isn't correct
5 Incorrect 390 ms 36984 KB Output isn't correct
6 Incorrect 387 ms 37124 KB Output isn't correct
7 Incorrect 390 ms 37008 KB Output isn't correct
8 Incorrect 383 ms 37300 KB Output isn't correct
9 Incorrect 386 ms 37088 KB Output isn't correct
10 Incorrect 385 ms 37180 KB Output isn't correct