-->
当前位置:首页 > 题库 > 正文内容

编程题:h0024. 解码器

Luz3年前 (2022-02-14)题库729
编写一个完整的程序,将一组字符正确解码为有效消息。您的程序应该读取一组简单编码字符的给定文件并打印字符包含的确切消息。这种简单编码的代码密钥是基于对ASCII 字符集的可打印部分的 单一算术操作的一对一字符替换 。

### 输入格式:

例如:输入文件包含:

1JKJ'pz'{ol'{yhklthyr'vm'{ol'Jvu{yvs'Kh{h'Jvywvyh{pvu5

1PIT'pz'h'{yhklthyr'vm'{ol'Pu{lyuh{pvuhs'I|zpulzz'Thjopul'Jvywvyh{pvu5

1KLJ'pz'{ol'{yhklthyr'vm'{ol'Kpnp{hs'Lx|pwtlu{'Jvywvyh{pvu5

### 输出格式:

您的程序应该打印以下消息:

*CDC is the trademark of the Control Data Corporation.

*IBM is a trademark of the International Business Machine Corporation.

*DEC is the trademark of the Digital Equipment Corporation.

您的程序应该接受使用相同编码方案的所有字符集,并且应该打印每组字符的实际消息。

### 输入样例:
in
1JKJ'pz'{ol'{yhklthyr'vm'{ol'Jvu{yvs'Kh{h'Jvywvyh{pvu5
1PIT'pz'h'{yhklthyr'vm'{ol'Pu{lyuh{pvuhs'I|zpulzz'Thjopul'Jvywvyh{pvu5
1KLJ'pz'{ol'{yhklthyr'vm'{ol'Kpnp{hs'Lx|pwtlu{'Jvywvyh{pvu5


### 输出样例:

out
*CDC is the trademark of the Control Data Corporation.
*IBM is a trademark of the International Business Machine Corporation.
*DEC is the trademark of the Digital Equipment Corporation.







答案:若无答案欢迎评论

发表评论

访客

◎欢迎参与讨论,请在这里发表您的看法和观点。