UVA - 458 - The Decoder
2014-04-06 21:02
399 查看
http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=399
字符解密。
题目已经说了,字符打印时候,出现ASCII码偏移,都查了单词,我还一开始就拿题目数据做字符码。。。真水。。。
ASCII码直接偏移7解决。
字符解密。
题目已经说了,字符打印时候,出现ASCII码偏移,都查了单词,我还一开始就拿题目数据做字符码。。。真水。。。
ASCII码直接偏移7解决。
#include <iostream> #include <stdio.h> #include <string.h> using namespace std; const int MAXN = 1000; int main() { char str[MAXN]; memset(str, 0, sizeof(str)); while ( cin >>str ) { for ( int i=0; i<strlen(str); i++ ) { str[i] -= 7; } // end for cout <<str <<endl; } // end while return 0; }
相关文章推荐
- 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 简单解密
- The Decoder - UVa458
- UVA 458 - The Decoder
- Uva 458 - The Decoder
- UVa 458 - The Decoder
- Uva 458 the Decoder 2015.5.24
- UVA 458 - The Decoder
- UVa 458 - The Decoder
- UVa 458 - The Decoder