跳至内容
璟雯院
珺璟如晔,雯华若锦
用户工具
登录
站点工具
搜索
工具
显示页面
修订记录
反向链接
最近更改
媒体管理器
网站地图
登录
>
最近更改
媒体管理器
网站地图
您在这里:
start
»
icpc
»
problems
»
luogup1851
icpc:problems:luogup1851
本页面只读。您可以查看源文件,但不能更改它。如果您觉得这是系统错误,请联系管理员。
====== 好朋友 ====== ===== 想法 ===== 直接暴力枚举 ===== 代码实现 ===== <code c++> #include<cstdio> int count(int x) { int sum = 0; for(int i=1; i<x; i++) if(x % i == 0) sum += i; return sum; } int main() { int s; scanf("%d", &s); while(true) { int other = count(s); if(other != s && count(other) == s ) { printf("%d %d", s, other); break; } s++; } return 0; } </code>
/app/www/public/data/pages/icpc/problems/luogup1851.txt
· 最后更改: 2024/04/20 16:18 由
温婕莺
页面工具
显示页面
修订记录
反向链接
回到顶部