PersonalCorpus 版 (精华区)
276663 08:03:08 14 Nov 2002 Big Guava
1226 Pascal Accepted 0.03 sec 65K
program p1226;
var
i,j,k:integer;
s,t:string;
ch:char;
function isalpha(ch:char):boolean;
begin
if ((ch>='A') and (ch<='Z')) or ((ch>='a') and (ch<='z')) then
result:=true
else result := false;
end;
begin
{$IFNDEF ONLINE_JUDGE}
assign(input,'input1226.txt');reset(input);
assign(output,'output1226.txt');rewrite(output);
{$ENDIF}
while not eof(input) do begin
readln(s);
t:=s;
i:=1;
while true do begin
while (i<length(s)) and not isalpha(s[i]) do inc(i);
if i>=length(s) then break;
j:=i+1;
while (j<=length(s)) and isalpha(s[j]) do inc(j);
for k:=i to j-1 do t[k]:=s[i+j-k-1];
i:=j+1;
end;
writeln(t);
end;
end.
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.129毫秒