| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 39252 | C++|刘一阳 | 亲和数 | C++ | Accepted | 1 MS | 236 KB | 301 | 2024-01-31 14:54:34 |
#include<iostream> using namespace std; int yinshuhe(int x) { int sum=0; for(int i=1;i<x;i++){ if(x%i==0) sum+=i; } return sum; } int main() { int i=1; while(1){ int b=yinshuhe(i); if(yinshuhe(b)==i&&i!=b) { cout<<i<<" "<<b; return 0; } i++; } return 0; }