题目:Problem - B - Codeforces
总结:
对于连续的倍数,要想连续的数量越大连续的数越小
对于该题遍历50就可以AC
代码献上(连续倍数):
#include<iostream>
#include<cmath>
using namespace std;
#define int long long
signed main()
{
int v; cin >> v;
while (v--)
{
int n; cin >> n;
int num = 0;
for (int a = 1; a <=100;a++)
{
int i = 0;
while (n % a == 0)
{
a++;
i++;
}
num = max(num, i);
}
cout << num << endl;
}
}