Submission #472244

#TimeUsernameProblemLanguageResultExecution timeMemory
472244HossamHero7Nadan (COCI18_nadan)C++14
50 / 50
1 ms204 KiB
#include <bits/stdc++.h> using namespace std; typedef long long ll; #define endl '\n' void solve(){ int k,n; cin>>k>>n; vector <int> v(n); ll sum = 0; for(int i=0;i<n-1;i++){ v[i] = i+1; sum += i+1; } ll ans = k - sum; v[n-1] = ans; for(auto i : v){ cout<<i<<endl; } } int main() { int t=1; // cin>>t; while(t--){ solve(); } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...