function superfactorialZeros(N) {
var result = 0;
for (i = 1; i <= N; i++) {
result += zeroes(i);
}
return result;
}
function zeroes(n) {
var i = 1;
var result = 0;
while (n >= i) {
i *= 5;
result += Math.floor(n / i);
}
return result;
}
// alternative of zeroes
var zeroes = function z(n) {
k = n/5 | 0
return k ? k + f(k) : 0
}
// or
function zeroes (n) {
s = 0
while (n/=5) s += n|0
return s
}
79 char
function superfactorialZeros(N) {
R = 0
for (; N ; N--)
for (j = 5; N >= j; j *= 5)
R += N / j | 0
return R
}
76 char
function superfactorialZeros(N) {
R = 0
while (n=N--)
while(n>=5)
R += (n/=5)|0
return R
}
well... 71 cahr
function superfactorialZeros(N) {
R = 0
while (j = N--)
while (j /= 5)
R += j & j
return R
}
Really learn a lot!