#include <iostream> using namespace std; int main(){ int n,j,sum; while (cin>>n){ sum=0; j=1 ; for(j=1;j<n;j++){ if ((n%j) == 0) { sum= sum+ j ; } ; } if ( sum>n ){ cout << "盈數" << endl; } else if ( sum<n ) { cout << "虧數" << endl; } else { cout << "完全數" << endl; } } }
加油