12
0
10
168
9
39
Jan
Tam
Tam jan
Jou dec
Dec
Tret jan
Tret tam
Tret
Oct
Jou dec
Sep
Maa
1
13
14
168
12
1
13
*/
#include
#include
Int issame (char [], a char [] b) {//judgment first address to a, b, the two strings are equal
for(int i=0; I<3; I++) {
If (a [I]! [I]=b) return 0;
}
return 1;
}
Void printint (int a, int I) {//integer with Mars text output
Char c1 [12] [4]={" jan ", "feb", "mar", "apr" and "may", "jun", "jly," "aug", "sep", "oct", "nov", "dec"};
Char c2 [12] [4]={" tam ", "hel", "maa," "huh", "tou", "kes", "hei", "elo", "syy", "Mr Lok", "killing", "jou"};
If (I==1) {
for(int i=0; I<3; I++) {
Putchar (c1 [a - 1] [I]);
}
}
The else {
for(int i=0; I<3; I++) {
Putchar (c2 [a - 1] [I]);
}
}
}
Void marstoearth (char [] a) {
Char c1 [12] [4]={" jan ", "feb", "mar", "apr" and "may", "jun", "jly," "aug", "sep", "oct", "nov", "dec"};
Char c2 [12] [4]={" tam ", "hel", "maa," "huh", "tou", "kes", "hei", "elo", "syy", "Mr Lok", "killing", "jou"};
Int len=strlen (a), x=0, y=0;
Char c [5]={" tret "};
{if (issame (c, a))
for(int i=0; I<13; I++) {
If (issame (c2 [I], a + 5)) x=(I + 1) * 13;
If (issame (c1 [I], a + 5)) x=I + 1;
}
if(! X) printf (" 0 \ n ");
The else printf (" % d \ n ", x);
}
The else {
If (len> 3) {
for(int i=0; I<13; I++) {
If (issame (c2 [I], a + 0))=y (I + 1) * 13;
If (issame (c1 [I], a + 4)) x=I + 1;
}
}
The else {
for(int i=0; I<13; I++) {
If (issame (c1 [I], a)) x=I + 1;
}
}
Printf (" % d \ n ", y + x);
}
}
Void earthtomars (char [] a) {//digital string into Mars text output again
Int len=strlen (a);
Int n=0, b [2]={0, 0};
for(int i=0; I
}
B [0]=n/13;
B [1]=n % 13;
If (b [0]) {
Printint (b [0], 2); Printf (" ");
Printint (b [1], 1); printf("\n");
}
The else {
Printint (b [1], 1); printf("\n");
}
}
Int main () {
int n;
The scanf (" % d ", & amp; n);
Char a, [n] [10].
for(int i=0; I<=n; I++) {
Gets (a [I]);
}
for(int i=1; I<=n; I++) {
If (* a [I] & gt; '0' & amp; & * a [I] <='9') earthtomars (a [I]);
Else if (* a [I]=='0') printf (" tret \ n ");
The else marstoearth (a [I]);
}
}
CodePudding user response:
Didn't look at your code, and I also met, looked at other blogs, found that: Mars article 13 is a tam, but a hel!!!!!!!!!!CodePudding user response:
Upstairs said is right, your code 13 multiples of no account,