Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- #define ULL unsigned long long int
- using namespace std;
- int main()
- {
- ios_base::sync_with_stdio(0);
- cin.tie(0);
- cout.tie(0);
- ULL n;
- cin>>n;
- cout<<(ULL)ceil((-1+sqrt(n*8+1))/2);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement