Submission #158927

#TimeUsernameProblemLanguageResultExecution timeMemory
158927aviroop123Nadan (COCI18_nadan)C++14
50 / 50
2 ms376 KiB
#include "bits/stdc++.h" using namespace std; #define pb push_back // #define int long long typedef long long ll; #define fi first #define se second #define pii pair<int,int> #define endl '\n' #define fr(i, a, b) for(int i = a; i <= b; i++) #define sz(s) (int)s.size() #define y1 fdfbvfds typedef long double f80; #define all(x) x.begin(), x.end() mt19937 rng(chrono::steady_clock::now().time_since_epoch().count()); ll rand(ll l,ll r){ uniform_int_distribution<ll> uid(l, r); return uid(rng); } const int mod = 1e9 + 7; int pwr(int a,ll b) { int ans = 1; while(b) { if(b & 1) { ans = ((ll)ans * a) % mod; } a = ((ll)a * a) % mod; b >>= 1; } return ans; } signed main() { ios_base::sync_with_stdio(0); cin.tie(NULL); cout.tie(NULL); int n, k; cin >> k >> n; fr(i, 1, n - 1) { cout << i << endl; k -= i; } cout << k << endl; return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...