zoj 1284
2011-11-20 23:58
316 查看
到时睡觉,继续尽量不熬夜~
/* zoj_1284 数论 水题 */ #include <iostream> #include <cstdio> #include <string.h> #define N 60000 using namespace std; int num ; 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 ) printf( "PERFECT\n" ); else if( num <n ) printf( "DEFICIENT\n" ); else printf( "ABUNDANT\n" ); } printf( "END OF OUTPUT\n" ); return 0; }
相关文章推荐
- zoj 1284 Perfection
- ZOJ 1284
- zoj 1284||poj 1528||hdu 1323(筛选法求因子和)
- zoj 1284 || poj 1528 Perfection
- ZOJ 1284 Perfection
- nyist 月老的烦恼(一)||zoj 1284 Perfection
- [水]ZOJ1284 POJ1528
- ZOJ-1284
- ZOJ 1284 数论
- UVALive5429 UVA382 POJ1528 HDU1323 ZOJ1284 Perfection【整除+水题】
- zoj 1004 深度优先遍历
- ZOJ 1122 Clock(模拟)
- ZOJ Problem Set - 3872||Beauty of Array
- ZOJ 3715 (贪心)
- 【ZOJ】3279 Ants
- ZOJ-1951
- zoj 3870 Team Formation(位运算,超时)
- ZOJ 1364 Machine Schedule(二分图最大匹配)
- ZOJ 1871. Steps
- zoj 3211 Dream City(DP)