1 #include<stdio.h> 2 #include<math.h> 3 int main() 4 { 5 int n; 6 scanf("%d",&n); 7 while(n--) 8 { 9 int m,i,ant,ans; 10 scanf("%d",&m); 11 m+=1; 12 ant=(int)sqrt(1.0*m); 13 for(i=2,ans=0; i<=ant; ++i) 14 if(!(m%i)) 15 ++ans; 16 printf("%d\n",ans); 17 } 18 }
时间: 2024-11-10 16:27:20