1 #include<stdio.h> 2 3 int a[10*10] = { 4 5650,4542,3554,473,946,4114,3871,9073,90,4329, 5 2758,7949,6113,5659,5245,7432,3051,4434,6704,3594, 6 9937,1173,6866,3397,4759,7557,3070,2287,1453,9899, 7 1486,5722,3135,1170,4014,5510,5120,729,2880,9019, 8 2049,698,4582,4346,4427,646,9742,7340,1230,7683, 9 5693,7015,6887,7381,4172,4341,2909,2027,7355,5649, 10 6701,6645,1671,5978,2704,9926,295,3125,3878,6785, 11 2066,4247,4800,1578,6652,4616,1113,6205,3264,2915, 12 3966,5291,2904,1285,2193,1428,2265,8730,9436,7074, 13 689,5510,8243,6114,337,4096,8199,7313,3685,211 14 }; 15 16 int main(){ 17 18 int count_2 = 0; 19 int count_5 = 0; 20 21 for(int i = 0; i < 100; i++){ 22 int t = a[i]; 23 while(t%2 == 0){ 24 count_2++; 25 t/=2; 26 } 27 t = a[i]; 28 while(t%5 == 0){ 29 count_5++; 30 t/=5; 31 } 32 } 33 printf("%d", count_2 > count_5 ? count_5 : count_2); 34 return 0; 35 }
原文:https://www.cnblogs.com/frosty/p/10462489.html