pascal 阶乘BackgroundThe problem is simple.You need to calculate the number of digit of the factorial of K (1

来源:学生作业帮助网 编辑:作业帮 时间:2024/11/16 22:24:08

pascal 阶乘BackgroundThe problem is simple.You need to calculate the number of digit of the factorial of K (1
pascal 阶乘
Background
The problem is simple.You need to calculate the number of digit of the factorial of K (1

pascal 阶乘BackgroundThe problem is simple.You need to calculate the number of digit of the factorial of K (1
首先回答第二问:repeat ... until 布尔表达式.
第一问:
var i,n,j:integer;
s,a:longint;
b:array[1..100]of longint;
begin
readln(n);
a:=1;
for i:= 1 to n do
begin
s:=i;
while s=0 do
begin
a:=a*i;
s:=s-1;
end;
b[i]:=a;
end;
s=0;
for i:=1 to n do s:=b[i]+s;
writeln(s);
end.