PAT(A) 1100
来源:互联网 发布:js 输入结束事件 编辑:程序博客网 时间:2024/06/05 06:51
1100. Mars Numbers (20)
People on Mars count their numbers with base 13:
- Zero on Earth is called "tret" on Mars.
- The numbers 1 to 12 on Earch is called "jan, feb, mar, apr, may, jun, jly, aug, sep, oct, nov, dec" on Mars, respectively.
- For the next higher digit, Mars people name the 12 numbers as "tam, hel, maa, huh, tou, kes, hei, elo, syy, lok, mer, jou", respectively.
For examples, the number 29 on Earth is called "hel mar" on Mars; and "elo nov" on Mars corresponds to 115 on Earth. In order to help communication between people from these two planets, you are supposed to write a program for mutual translation between Earth and Mars number systems.
Input Specification:
Each input file contains one test case. For each case, the first line contains a positive integer N (< 100). Then N lines follow, each contains a number in [0, 169), given either in the form of an Earth number, or that of Mars.
Output Specification:
For each number, print in a line the corresponding number in the other language.
Sample Input:4295elo novtamSample Output:
hel marmay11513
模拟题,题目大意就是让你进制转换。13进制的转换,给数字输出对应的英文,给英文输出对应的数字。用map 和 string 进行处理就好。
- PAT(A) 1100
- PAT A 1100
- PAT A A+B Format
- pat: 1016 A+B
- PAT [A] 1054
- Pat(A) 1002
- PAT(A) 1005
- PAT(A) 1006
- PAT(A) 1007
- PAT(A) 1008
- PAT(A) 1009
- PAT(A) 1011
- PAT(A) 1012
- PAT(A) 1015
- PAT(A) 1031
- PAT(A) 1035
- PAT(A) 1013
- PAT(A) 1019
- 持续集成篇 --Hudson持续集成服务器的安装配置与使用
- 自定义带删除按钮的EditText(输入文字后,最右边浮现×号)
- HDU1241 Oil Deposits(深搜DFS)
- maxLines android:ellipsize="end" Spannable 互相之间存在冲突
- 使Eclipse下支持编写HTML/JS/CSS/JSP页面的自动提示
- PAT(A) 1100
- isDebugEnabled 、isInfoEnabled 为啥要使用
- React Native和hybrid
- Scala继承知识点
- 一个manifest文件格式
- springmvc+jquery 实现ajax页面无刷新请求
- 安卓验证码识别
- JBOSS最大连接数配置和jvm内存配置
- iOS 证书的申请