小C的倍数问题
Accepts: 1990
Submissions: 4931
Time Limit: 2000/1000 MS (Java/Others)
Memory Limit: 32768/32768 K (Java/Others)
Statistic |Submit | Clarifications | Back
#include<iostream>
#include<cmath>
using namespace std;
int main()
{
int t;
long long n;
cin>>t;
while(t--)
{
cin>>n;
long long ans=0;
long long x=n-1;
for(long long i=1;i*i<=x;i++)
{
if(x%i==0)
{
if(i*i==x)
ans+=1;
else
ans+=2;
}
}
cout<<ans<<endl;
}
return 0;
}