【uva - 458 The Decoder】
2012-07-10 19:35
525 查看
The Decoder |
Input and Output
For example: with the input file that contains: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
your program should print the message:
*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.
Your program should accept all sets of characters that use the same encoding scheme and should print the actual message of each set of characters.
Sample Input
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
Sample Output
*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.
// Project name : C ( The Decoder ) // File name : main.cpp // Author : Izumu // Date & Time : Tue Jul 10 19:28:03 2012 #include <iostream> #include <stdio.h> #include <string> #include <cmath> using namespace std; int main() { char ch; while (cin.get(ch)) { ch = ch - ('J' - 'C'); cout << ch; while (cin.get(ch) && ch != '\n') { ch = ch - ('J' - 'C'); cout << ch; } cout << endl; } return 0; } // end // ism
相关文章推荐
- UVA 458 The Decoder
- UVa 458 - The Decoder
- UVA 458 The Decoder
- UVa458 - The Decoder-字符串-难度1
- UVA - 458 - The Decoder
- uva 458 - The Decoder
- UVa 458 The Decoder (最简代码!)
- UVa 458 - The Decoder
- UVa 458 - The Decoder
- UVA 458 - The Decoder
- UVA 458-The Decoder
- uva-458 - The Decoder
- UVA458 The Decoder【编码】
- UVA - 458 The Decoder
- UVa OJ 458-The Decoder
- The Decoder - UVa458
- UVA 458 - The Decoder
- UVA 458 The Decoder 简单解密
- The Decoder - UVa458
- Uva 458 - The Decoder