#include<bits/stdc++.h>
#define y1 yyyy
using namespace std;
const int N=3e5+10;
signed main()
{
for(int now=1;now<=N;now++){
int r=0;
int l=1;
while(l<N)
{
r=(N-1)/((N-1)/l);
l=r+1;
}
}
return 0;
}
#include<bits/stdc++.h>
#define y1 yyyy
using namespace std;
const int N=3e5+10;
signed main()
{
for(int now=1;now<=N;now++){
int r=0;
int l=1;
while(l<2*N)
{
l=l+sqrt(N);
}
}
return 0;
}
这两份代码运行效率差距特别大,第二份只要 1s,第一份需要 5s,求解答