codeforces882D
JACL C++菜鸟

codeforces1870C 连续 个数字里边必有能整除 的数字 , 所以只需从 开始枚举 .

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#include<iostream>
using namespace std;
int main()
{
int t;
cin>>t;
while(t--){
long long int n;
cin>>n;
int ans=0;
for(int i=1;i<=n;i++){
if(n%i==0) ans++;
else break;
}
cout<<ans<<endl;
}
return 0;
}
 评论