到时睡觉,继续尽量不熬夜~
/*
zoj_1284 数论
水题
*/
#include <iostream>
#include <cstdio>
#include <string.h>
#define N 60000
using namespace std;
int num[N];
int main()
{
int i,j,n;
for( i=1;i<=N/2;i++ )
for( j=2;i*j<=N;j++ )
num[i*j]+=i;
printf( "PERFECTION OUTPUT\n" );
while( scanf("%d",&n) && n )
{
printf( "%5d ",n );
if( num[n]==n ) printf( "PERFECT\n" );
else if( num[n]<n ) printf( "DEFICIENT\n" );
else printf( "ABUNDANT\n" );
}
printf( "END OF OUTPUT\n" );
return 0;
}