Time Exceeded
/usr/bin/ld.bfd: warning: /out/link.res contains output sections; did you forget -T?
代码
var k,i,ans:longint;
s:ansistring;
function check(l,r:longint):boolean;
var th:ansistring;
i:longint;
begin
th:='';
for i:=l to r do th:=th+s[i];
// writeln(th);
for i:=1 to length(th)div 2+1 do
if th[i]<>th[length(th)-i+1] then exit(false);
exit(true);
end;
begin
readln(k);
readln(s);
for i:=1 to length(s) do begin
if i+k-1>length(s) then break;
if check(i,i+k-1) then inc(ans);
end;
writeln(ans);
close(input);
close(output);
end.