Accepted
代码
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin>>n;
long long x=sqrt(n);
cout<<x+n/(x+1);
}
#include <bits/stdc++.h>
using namespace std;
int main()
{
long long n;
cin>>n;
long long x=sqrt(n);
cout<<x+n/(x+1);
}