1154

#include <iostream>
using namespace std;
int yinzizhihe(int a){
    int b = 0;
    for(int i = 1;i<a;i++){
        if(a%i==0){
            b = b+i;
        }
    }
    return b;
}
int main(){
    int a = 4;
    int sum1 = 0;
    int b = 0;
    while(1){
        b = yinzizhihe(a);
        sum1 = yinzizhihe(b);
        if(a==sum1 && b!=sum1){
            cout<<a<<" "<<b;
            break;
        }
        a++;
    }
    return 0;
}

  

posted @ 2023-01-31 18:07  陈若麟  阅读(3)  评论(0编辑  收藏  举报