Frank_6 !!!
笔记
log: https://hlcoding.com/blog/share/content/8606/
__int128: https://hlcoding.com/blog/share/content/8520/
sort: https://hlcoding.com/blog/share/content/8428/
join-find: https://hlcoding.com/blog/share/content/8211/
dijsktra: https://hlcoding.com/blog/share/content/8210/
spfa: https://hlcoding.com/blog/share/content/8209/
list: https://hlcoding.com/blog/share/content/8208/
推荐一个题目luogu P1248
// 模拟 + 函数 + 暴力枚举
#include <iostream>
using namespace std;
int n;
int is_primes(int ty) {
int sum = 0;
for (int i = 2; i < ty; i ++ ) if (ty % i == 0) sum += i;
return sum + 1;
}
int main() {
cin >> n;
// cout << is_primes(220) << " " << is_primes(284);
for (int i = n; ; i ++ ) {
int b = is_primes(i);
if (i == is_primes(b) && i != b) {
cout << i << " " << b;
return 0;
}
}
return 0;
}
—— 本文来自火龙信奥(义乌睿码科技):义乌青少年信息学奥赛与编程教育平台,专注 CSP-J/S、NOIP、GESP 竞赛培训,线上线下融合教学,助力编程升学。网址:hlcoding.com