#include<stdio.h>#include<vector>usingnamespace std;intIsWanOrYing(int a){int sum =1;for(int i =2; i < a; i++){if(a % i ==0){
sum += i;}}if(sum == a){return1;}elseif(sum > a){return2;}return-1;}intmain(){
vector<int> wan;
vector<int> ying;for(int i =2; i <=60; i++){if(IsWanOrYing(i)==1){
wan.push_back(i);}elseif(IsWanOrYing(i)==2){
ying.push_back(i);}}printf("E:");for(vector<int>::iterator it = wan.begin(); it != wan.end(); it++){printf(" %d",*it);}printf("\n");printf("G:");for(vector<int>::iterator it = ying.begin(); it != ying.end(); it++){printf(" %d",*it);}return0;}
异常:Connect timed out
创建新项目时,提示time out
解决方案:修改gradle下载地址,使用国内镜像地址 distributionUrlhttps\://services.gradle.org/distributions/gradle-8.2-bin.zip修改成distributionUrlhttps\://mirrors.c…