| 记录编号 | 77967 | 评测结果 | AAAAAA | ||
|---|---|---|---|---|---|
| 题目名称 | 1074.[POJ1401] 阶乘末尾的0 | 最终得分 | 100 | ||
| 用户昵称 | 是否通过 | 通过 | |||
| 代码语言 | Pascal | 运行时间 | 0.312 s | ||
| 提交时间 | 2013-11-02 21:39:28 | 内存使用 | 0.08 MiB | ||
var
t,sum,a,b:qword;
n,i,j:longint;
function f(x:qword):qword;
begin
if x<5 then
exit(0)
else
exit(x div 5+f(x div 5));
end;
begin
assign(input,'fact.in');
assign(output,'fact.out');
reset(input);
rewrite(output);
//while not(eof) do
//begin
readln(t);
for i:=1 to t do
begin
readln(n);
writeln(f(n));
end;
//end;
close(input);
close(output);
end.