#include <bits/stdc++.h>
using namespace std;
#define int long long
int s,t;
int shai(int x){
int ans = 0;
for(int i = 1;i < sqrt(x);i++){
if(x % i == 0){
ans += i;
ans += (x / i);
}
}
return ans;
}
signed main(){
ios::sync_with_stdio(false);
cin.tie(0),cout.tie(0);
cin >> s;
for(int i = s;;i++){
t = shai(i);
if(shai(t) == i && i != t){
cout << i << " " << t << endl;
return 0;
}
}
return 0;
}
题目
求优化时间复杂度 or 调代码(马蜂良好)(只要能AC就行)
2.(求 0÷0)(话说对于 0 可不可以作为除数,可以到抖音上去搜)