超时求改

只得了40分

var

m,n,i,j:longint;

s:string;

found:boolean;

begin

readln(m,n);

for i:=m to n do begin

found:=true;

for j:=2 to round(sqrt(i)) do

if i mod j=0 then found:=false;

if found then begin

str(i,s);

for j:=1 to length(s) do

if s[j]s[length(s)-j+1] then found:=false;

end;

if found then writeln(i);

end;

end.

0 条评论

目前还没有评论...

信息

ID
1042
难度
7
分类
搜索 | 搜索与剪枝 点击显示
标签
(无)
递交数
6583
已通过
1516
通过率
23%
被复制
13
上传者