| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 1323489 | Jawad_Akbar_JJ | Odd-even (IZhO11_oddeven) | C++20 | 0 ms | 332 KiB |
#include <iostream>
using namespace std;
#define int long long
signed main(){
int n;
cin>>n;
int l = 0, r = 2e9;
while (l + 1 < r){
int mid = (l + r) / 2;
if ((mid * (mid + 1)) / 2 >= n)
r = mid;
else
l = mid;
}
cout<<2 * n - r<<'\n';
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
