solution
找末尾0的个数,即找有多少对2和5
==>问题等价于寻找所给数据中,有多少个2和5的因子,较少出现的因子次数即为0的个数
#include <iostream>
using namespace std;
int main()
{
// 请在此输入您的代码
printf("31");
return 0;
}
#include<stdio.h>
#include<math.h>
typedef long long ll;
int main(){
ll x, two = 0, five = 0, ans = 0;
for(int i = 0; i < 100; i++){
scanf("%lld", &x);
while(x % 2 == 0){
two++;
x /= 2;
}
while(x % 5 == 0){
five++;
x /= 5;
}
}
if(two > five) two = five;
printf("%lld", two);
return 0;
}