Submission #472444

#TimeUsernameProblemLanguageResultExecution timeMemory
472444Beboo44Nadan (COCI18_nadan)C++17
50 / 50
1 ms204 KiB
#include <bits/stdc++.h> using namespace std; #define all(v) ((v).begin()), ((v).end()) #define sz(v) ((int)((v).size())) typedef long long ll; typedef vector<int> vi; typedef vector<pair<ll , int> > vpli; typedef set<char> st; typedef stack<int> s; typedef deque<int> dq; typedef queue<int> q; #define fast_io ios_base::sync_with_stdio(0); cin.tie(0) int main() { ll n,k; cin>>n>>k; ll cast = n; for(int i=1; i<k; ++i){ cout<<i<<" "; n-=i; } cout<<n; return 0; }

Compilation message (stderr)

nadan.cpp: In function 'int main()':
nadan.cpp:21:5: warning: unused variable 'cast' [-Wunused-variable]
   21 |  ll cast = n;
      |     ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...