#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = n - 1; i > sqrt(n); i--) if (n % i == 0) {
cout << i;
break;
}
return 0;
}
#include <bits/stdc++.h>
using namespace std;
int main() {
int n;
cin >> n;
for (int i = 2; i <= n; i++) if (n % i == 0) {
cout << n / i;
break;
}
return 0;
}
从时间复杂度看 根号n不还小一点吗 为什么上面的反而过不了 有没有什么估计时间的方法