Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<bits/stdc++.h>
- #include<cmath>
- using namespace std;
- int main()
- {
- int n,x,y;
- cin>>n;
- x=ceil(sqrt((double)n));
- y=ceil((double)n/x);
- cout<<x+y<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement