1044 火星数字 (20 分)
火星人是以 13 进制计数的:
例如地球人的数字 29
翻译成火星文就是 hel mar
;而火星文 elo nov
对应地球数字 115
。为了方便交流,请你编写程序实现地球和火星数字之间的互译。
输入第一行给出一个正整数 N(<100),随后 N 行,每行给出一个 [0, 169) 区间内的数字 —— 或者是地球文,或者是火星文。
对应输入的每一行,在一行中输出翻译后的另一种语言的数字。
4
29
5
elo nov
tam
hel mar
may
115
13
#include
#include
#include
using namespace std;
int main()
{
int n,l,num=0;
string fire[13]={"tret","jan", "feb", "mar", "apr", "may", "jun", "jly", "aug", "sep", "oct", "nov", "dec"};
string jinwei[13]={"tam", "hel", "maa", "huh","tou", "kes", "hei", "elo", "syy", "lok", "mer", "jou"};
string mess;
string t="";
cin>>n;
getchar();
for(int i=0;i='0'&&mess[0]<='9')
{
for(int m=0;m