- 捕风捉影
- 2010-03-06 14:12:01 @
program p1042;
var n,m:int64;
I,J,LS:LONGINT;
b:boolean;
ns:string;
begin
readln(n,m);
for i:=n to m do
IF (I MOD 4 0) THEN
begin
str(i,ns);
b:=true;
ls:=length(ns);
for j:=1 to (ls div 2)do
if ns[j]ns[ls+1-j] then
BEGIN
b:=false;
break;
end;
if b then
begin
for j:=2 to trunc(sqrt(i)) do
if i mod j=0 then
begin
b:=false;
break;
end;
end;
if b then writeln(i);
end;
end.
0 条评论
目前还没有评论...