可爱捏~

夏水流莹OwO  •  12天前


include<stdio.h>

int main() {

int n, a = 0, b = 0, j;
scanf("%d", &n);
for (int i = 0; i < n; i++) {
	scanf("%d", &j);
	while (j % 5 == 0) {
		a = a + 1;
		j = j / 5;
	}
	while (j % 2 == 0) {
		b = b + 1;
		j = j / 2;
	}
}
if (a < b) {
	printf("%d", a);
} else {
	printf("%d", b);
}
return 0;

}


评论:

请先登录,才能进行评论