Var n,i,j,p,q: longint;
Begin
p := 1;
q := 0;
read(n);
If n=1 Then
Begin
writeln(1);
halt;
End;
For i:=1 To n Do
Begin
j := i;
while j mod 2 = 0 Do
Begin
inc(q);
j := j Div 2;
End;
while j mod 5 = 0 Do
Begin
dec(q);
j := j Div 5;
End;
q := q Mod 4;
while q<0 Do inc(q,4);
p := p*j Mod 10;
End;
p := p*6 Mod 10;
For i:=1 To q Do
p := p*2 Mod 10;
Case p of
1 : writeln(’drxh’);
2 : writeln(’dyf’);
3 : writeln(’hades’);
4 : writeln(’xiaokeke’);
5 : writeln(’xiaokaka’);
6 : writeln(’atttx123’);
7 : writeln(’h’);
8 : writeln(’LIFE’);
9 : writeln(’dadi’);
End;
End.
最末非0原程序A了(只改了输出)!!!
var
s,o,p,m,n:longint;
begin
readln(m);
o:=1;
for n:=1to m do
begin
p:=n;
while(p mod 2=0)do
begin
inc(s);
p:=p div 2;
end;
while(p mod 5=0)do
begin
dec(s);
p:=p div 5;
end;
o:=(o*p)mod 10;
end;
o:=(o shl(s and 3+4)mod 10);
case o of
1:write(’drxh’);
2:write(’dyf’);
3:write(’hades’);
4:write(’xiaokeke’);
5:write(’xiaokaka’);
6:write(’atttx123’);
7:write(’h’);
8:write(’LIFE’);
9:write(’dadi’);
end;
end.