hdoj1215

    技术2022-05-20  50

    #include <stdio.h>#include <math.h>

    int main(){ int t; int i,j; int sum,num;

     scanf("%d",&t);

     for(i=0;i<t;i++) {  scanf("%d",&num);  sum = 1;

      for(j=2;j<=(int)sqrt(num);j++) //!  {   if(num % j == 0)   {    sum += j;    if(j != num/j)     sum += num/j;   }  }

      printf("%d/n",sum); }

        return   0; }

     


    最新回复(0)