题目: |
program Gxp2;
var i , j , s ,sp1 : integer ;
p: boolean ;
a: array[1..10] of integer ;
begin
sp1:=1; a[1]:=2; j:=2;
while sp1<10 do
begin
j:=j+1; p:=true;
for i:=2 to j-1 do
if (j mod i=0) then p:=false;
if p then begin
sp1:=sp1+1; a[sp1]:=j;
end;
end;
j:=2; p:=true;
while p do
begin
s:=1;
for i:=1 to j do s:=s*a[i];
s:=s+1;
for i:=2 to s-1 do
if s mod i=0 then p:=false;
j:=j+1;
end;
writeln(s); writeln;
end. 输出:30031
|