一贴二用
  • 板块灌水区
  • 楼主King_and_Grey
  • 当前回复3
  • 已保存回复3
  • 发布时间2024/12/4 22:16
  • 上次更新2024/12/5 15:55:33
查看原帖
一贴二用
1058749
King_and_Grey楼主2024/12/4 22:16
#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÷00 \div 0(话说对于 00 可不可以作为除数,可以到抖音上去搜)

2024/12/4 22:16
加载中...