Submission #165339

#TimeUsernameProblemLanguageResultExecution timeMemory
165339AsagNadan (COCI18_nadan)C++14
50 / 50
2 ms376 KiB
#include <bits/stdc++.h> using namespace std; int k, n, sum; int sz; int main () { scanf ("%d%d", &k, &n); while (n > 1) { printf ("%d\n", ++ sz); sum += sz; n --; } printf ("%d", k - sum); }

Compilation message (stderr)

nadan.cpp: In function 'int main()':
nadan.cpp:10:11: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
     scanf ("%d%d", &k, &n);
     ~~~~~~^~~~~~~~~~~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...