Submission #337062

# Submission time Handle Problem Language Result Execution time Memory
337062 2020-12-18T05:05:19 Z kutbilim_one Odd-even (IZhO11_oddeven) C++14
0 / 100
1 ms 364 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.0+ sqrt(8.0*n-7.0))/2.0 );

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