poj 1552 Doubles

 #include <stdio.h>
 #include <stdlib.h>
 ];

 int cmp(const void *a, const void *b)
 {
     return *(int*)a - *(int*)b;
 }

 int main()
 {
     int n,i,j,result;
     )
     {
         i = result = ;
         nums[i] = n;
         ++i;
         while(scanf("%d",&n) && n)
         {
             nums[i] = n;
             ++i;
         }

         n = i;
         qsort(nums,i,]),cmp);
         ; i < n; ++i)
         {
             ; j < n; ++j)
             {
                  && nums[j]%nums[i] == )
                 {
                     ++result;
                     break;
                 }
             }
         }
         printf("%d\n",result);
     }
 }
上一篇:HDU5735 : Born Slippy


下一篇:keepalived高可用简介与配置