1100 Mars Numbers (20 point(s))
People on Mars count their numbers with base 13:
- Zero on Earth is called "tret" on Mars.
- The numbers 1 to 12 on Earth 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:
Sample Output:
经验总结:
简单的划水题,不过要注意几点:
1。输入方面要判断输入类型,数字还是字母,是字母的话,还要判断输出的是一个单词还是两个单词。
2。转换要注意,13 26 39这样的低位为0的,只需要输出高位的火星文,低位不用输出。
3。一定注意字符别写错了!! hel和hei 很像的!! 太容易看错了.....
AC代码