program test_2015_2;
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')+1]);
End.
输入:HELLA-2015 输出:KCSSA2015
|