Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- #define ll long long
- #define ld long double
- #define pb push_back
- #define x first
- #define y second
- #define fastread ios_base::sync_with_stdio(false);cin.tie(NULL);cout.tie(NULL);
- #define PI (atan(1)*4)
- #define mp make_pair
- using namespace std;
- int main()
- {
- fastread;
- ll n;
- cin >> n;
- cout << (long long)((sqrt(1 + 8 * n) - 1) / 2);
- return 0;
- }
Add Comment
Please, Sign In to add comment