Submission #158732

# Submission time Handle Problem Language Result Execution time Memory
158732 2019-10-18T14:23:45 Z InfiniteJest Nadan (COCI18_nadan) C++14
50 / 50
2 ms 376 KB
#include <iostream>
#include <fstream>
#include <vector>
#include <queue>
#include <algorithm>
#include <math.h>
#include <map>
#include <set>
#define pb push_back
#define mp make_pair
#define fi first
#define se second
using namespace std;

ifstream in("input.txt");
ofstream out("output.txt");

typedef long long ll;

int n,k;

int main(){
  cin>>k>>n;
  int tot=0;
  for(int i=0;i<n-1;i++){
    cout<<i+1<<endl;
    tot+=i+1;
  }
  cout<<k-tot;


}
# Verdict Execution time Memory Grader output
1 Correct 2 ms 256 KB Output is correct
2 Correct 2 ms 376 KB Output is correct
3 Correct 2 ms 376 KB Output is correct
4 Correct 2 ms 256 KB Output is correct
5 Correct 2 ms 256 KB Output is correct
6 Correct 2 ms 376 KB Output is correct
7 Correct 2 ms 256 KB Output is correct
8 Correct 2 ms 376 KB Output is correct
9 Correct 2 ms 376 KB Output is correct
10 Correct 2 ms 256 KB Output is correct