# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1085902 | 2024-09-09T03:10:27 Z | lmaobruh | Nadan (COCI18_nadan) | C++14 | 1 ms | 460 KB |
#include <bits/stdc++.h> using namespace std; #define ll long long #define fo(i, a, b) for (int i = (a); i <= (b); ++i) #define fd(i, a, b) for (int i = (a); i >= (b); --i) #define ii pair<int, int> #define fi first #define se second #define pb push_back #define all(x) x.begin(), x.end() const int N = 1e6+5; int32_t main() { cin.tie(0)->sync_with_stdio(0); if (fopen("A.inp", "r")) { freopen("A.inp", "r", stdin); // freopen("A.out", "w", stdout); } int n, k; cin >> k >> n; fo(i, 1, n-1) { cout << i << ' '; k -= i; } cout << k; }
Compilation message
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
1 | Correct | 1 ms | 460 KB | Output is correct |
2 | Correct | 0 ms | 348 KB | Output is correct |
3 | Correct | 0 ms | 348 KB | Output is correct |
4 | Correct | 0 ms | 348 KB | Output is correct |
5 | Correct | 0 ms | 348 KB | Output is correct |
6 | Correct | 0 ms | 348 KB | Output is correct |
7 | Correct | 0 ms | 348 KB | Output is correct |
8 | Correct | 0 ms | 348 KB | Output is correct |
9 | Correct | 1 ms | 348 KB | Output is correct |
10 | Correct | 0 ms | 348 KB | Output is correct |