NYOJ 216-A problem is easy

 1 #include<stdio.h>
 2 #include<math.h>
 3 int main()
 4 {
 5     int i,m,n,k,t;
 6     scanf("%d",&n);
 7     while(n--)
 8     {
 9         scanf("%d",&m);
10         t=sqrt(m+1);
11         for(i=2,k=0;i<=t;i++)
12         if((m+1)%i==0)
13         k++;
14         printf("%d\n",k);
15     }
16     return 0;
17 }

posted on 2012-08-03 08:01  mycapple  阅读(213)  评论(0)    收藏  举报

导航