Submission #81853

#TimeUsernameProblemLanguageResultExecution timeMemory
81853jvalsortavNadan (COCI18_nadan)C++14
50 / 50
2 ms628 KiB
#include <cstdio> #include <cstdlib> #include <cmath> #include <iostream> #include <cctype> #include <ctime> using namespace std; int n, k, x; int main() { cin >> k; cin >> n; x = 1; while (n-1){ if (k <= 0){ break; } cout << x << endl; k += -x; x++; n--; } if (k > 0){ cout << k; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...