UVa 11946 - Code Number
2015-06-17 09:43
549 查看
题目:两个小朋友写信让父母传递,为了不让父母看信里的内容,对信里面的内容加密,
请对加密后的信解密。
分析:字符串,数论。只有10个字母被选择称为0~9的映射,直接转化即可。
说明:╮(╯▽╰)╭UVa又打不开了╮(╯▽╰)╭。
请对加密后的信解密。
分析:字符串,数论。只有10个字母被选择称为0~9的映射,直接转化即可。
说明:╮(╯▽╰)╭UVa又打不开了╮(╯▽╰)╭。
#include <cstdlib> #include <cstring> #include <cstdio> #include <cmath> char buf[81]; char map[11] = "OIZEASGTBP"; int main() { int T; while (~scanf("%d",&T)) { getchar(); while (T --) { while (gets(buf) && buf[0]) { for (int i = 0; buf[i]; ++ i) if (buf[i] >= '0' && buf[i] <= '9') buf[i] = map[buf[i]-'0']; puts(buf); } if (T) printf("\n"); } } return 0; }
相关文章推荐
- Perl获取指定目录中的文件
- 【Selenium专题】WebDriver启动Chrome浏览器(一)
- 安卓登陆框记住密码和自动登录的实现
- 简介AngularJS的HTML DOM支持情况
- 前摄器设计模式学习笔记
- 海森矩阵 Hessian matrix
- Depthimage_to_laserscan安装并执行
- 图像预处理技术一
- leetCode(4):Insertion Sort List
- leetCode(4):Insertion Sort List 分类: leetCode 2015-06-17 09:42 205人阅读 评论(0) 收藏
- 海森矩阵 Hessian matrix
- epoll和select区别
- sqlite3 alter table
- poj-2677 动态规划、双调欧几里得旅行商
- CvClassifier和宏 CV_CLASSIFIER_FIELDS()
- [转]20150617-让程序员跳槽的非钱原因
- Android(实习生)第一次面试总结,如有回答错误还请大家指出来哦~
- swing jtree 添加了复选框的树,利用了递归获取选中的果实
- Android手机平板两不误,使用Fragment实现兼容手机和平板的程序
- BMap API(Baidu)与google.maps API(Google)