Submission #337060

# Submission time Handle Problem Language Result Execution time Memory
337060 2020-12-18T05:04:25 Z kutbilim_one Odd-even (IZhO11_oddeven) C++14
0 / 100
1 ms 512 KB
/** @kutbilimone **/
#include <bits/stdc++.h>

using namespace std;

#define endl '\n'
#define all(x) x.begin(),x.end()
#define int long long

signed main(){
	ios_base::sync_with_stdio(false);
	cin.tie(nullptr);

	int n;
	cin >> n;
	cout << 2*n - floor( (1+ sqrt(8*n-7))/2 );

	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 1 ms 364 KB Output is correct
2 Correct 1 ms 384 KB Output is correct
3 Correct 1 ms 384 KB Output is correct
4 Incorrect 1 ms 512 KB Output isn't correct
5 Halted 0 ms 0 KB -