大师出品

大师  •  5个月前


include <bits/stdc++.h>

using namespace std;

int main() {

int n, k, t1 = 0, t2 = 0;
cin >> n;
//vector<int> ai;
for (int i = 1; i <= n; i++) {
	cin >> k;
	while (k % 5 == 0) {
		// 5  30   5   6    2  3
		k /= 5;
		t1++;
	}
	while (k % 2 == 0) {
		//222222 2 3 7 5      55555555  3 2 2
		k /= 2;
		t2++;
	}
}
//cout << t1 << " " << t2 << endl;
cout << min(t1, t2);
return 0;

}


评论:


De.  •  2个月前

请先登录,才能进行评论