program test_2012_3;
var a, b: String;
i : Integer;
begin
a:= 'AABBCCDKKRRSSXX';
readln(b);
for i := 1 to length(b) Do
If (b[i] >= '0') AND (b[i] <= '9')
then write(b[i])
else
if (b[i] >= 'A') and (b[i] <= 'Z')
then write(a[ord(b[i]) - ord('A') ]);
End.
输入:NOIP-2012
输出:SXKX2012
|