#17634: 水解01


bibiyeh1999@gmail.com (瑤文)


步驟:

1.輸入N

2.找出N所有因數,除了自己和1

3.把所有因數相加,和N比大小,對應輸出perfect, deficient 或者abundant

要點:

1.如何找出所有因數?

int temp;

for( int i = 2 ~ 根號N )

{

if( N % i == 0 )

       temp+=i;

 }