Submission #839108

#TimeUsernameProblemLanguageResultExecution timeMemory
839108BulaNadan (COCI18_nadan)C++14
50 / 50
1 ms260 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define all(x) x.begin(),x.end() #define rall(x) x.rbegin(),x.rend() #define ff first #define sc second #define int ll const ll mod = 1e9 + 7, N = 1e5 + 1; main(){ int k, n; cin >> k >> n; int sum = 0; for(int i = 1; i <= n - 1; i++){ cout << i << endl; sum += i; } cout << k - sum << endl; }

Compilation message (stderr)

nadan.cpp:13:1: warning: ISO C++ forbids declaration of 'main' with no type [-Wreturn-type]
   13 | main(){
      | ^~~~
#Verdict Execution timeMemoryGrader output
Fetching results...