Submission #6321113


Source Code Expand

Copy
#include<bits\stdc++.h>
using namespace std;
#define int long long

int n,sum;

main() {
  cin >> n;
  for(int i=0;;++i) {
    sum += i;
    if (sum >= n) {
      sum -= n;
      n = i;
      break;
    }
  }
  for(int i=1;i<=n;++i) if (i != sum) cout << i << " ";
  cout << endl;
}
  

Submission Info

Submission Time
Task B - Exactly N points
User kr
Language C++14 (GCC 5.4.1)
Score 0
Code Size 304 Byte
Status

Compile Error

./Main.cpp:1:24: fatal error: bits\stdc++.h: No such file or directory
 #include<bits\stdc++.h>
                        ^
compilation terminated.