PersonalCorpus 版 (精华区)
151829 12:38:00 2 Mar 2002
Bozhang,HIT,P.R.China 1197 Pascal Accepted 0.01 sec 49K
const sp:array['a'..'h','1'..'8'] of byte=((2,3,4,4,4,4,3,2),
(3,4,6,6,6,6,4,3),
(4,6,8,8,8,8,6,4),
(4,6,8,8,8,8,6,4),
(4,6,8,8,8,8,6,4),
(4,6,8,8,8,8,6,4),
(3,4,6,6,6,6,4,3),
(2,3,4,4,4,4,3,2));
var
ch1,ch2:char;
n:byte;
begin
readln(n);
while n<>0 do begin
readln(ch1,ch2); dec(n);
writeln(sp[ch1,ch2]);
end;
end.
Powered by KBS BBS 2.0 (http://dev.kcn.cn)
页面执行时间:2.049毫秒