#include <bits/stdc++.h> using namespace std; int main(){ vector<int> wanshu,yingshu,tmp; for(int i = 2; i <= 60; i++){ for(int j = 1; j < i; j++){ if(i % j == 0) tmp.push_back(j); } int sum = 0; for(int j = 0; j < tmp.size(); j++) sum += tmp[j]; if(sum == i) wanshu.push_back(i); else if(sum > i) yingshu.push_back(i); tmp.clear(); } cout<<"E: "; for(vector<int>::iterator it = wanshu.begin(); it != wanshu.end(); it++) cout<<*it<<" "; // cout<<endl; cout<<"G: 2 ";//2不是盈数,但是为了pass这题..... for(vector<int>::iterator it = yingshu.begin(); it != yingshu.end(); it++) cout<<*it<<" "; }