Title address:? http://acm.nyist.net/JudgeOnline/problem.php?pid=198?
Description
we usually count from left to right number, but our little white classmate recently heard that the Germans count and we are somewhat different, they happen to be opposite to us, is from right to left number. So when he saw123will say"321".
Now there is a German professor at the University of Zhengzhou onACM's lectures. Now he hires you to serve as his assistant, and he gives you some information to get you to find the pages of the information in the book. Now that you have found the corresponding page number, you need to tell him the page number in English.
to simplify our problem, you only need to return the uppercase initials of the word. (Number0read into lettersO)
Note: Each digit is read separately and therefore does not appear Oneread asDouble Onethe situation.
input
The input is divided into two parts:
First part: an integerT (1<=t<=1000)
Part II: AltogetherTline, one number per action. The length of each number does not exceedTenbit.
Output
each set of outputs has a separate line, and the output corresponds to the abbreviation for the page number returned to the German professor.
Sample Input
2
12
1234
Sample Output
toFtto?? Code:#include <stdio.h>
//working with Data
Static void Handlerdata (Char *arrdir,int inputnumber);
int Main ()
{
??? Char arrdir[] = {' O ',' O ',' T ',' T ',' F ',' F ',' S ',' S ',' E ',' N '};
???
??? int Readlen = 0;
??? scanf("%d", &readlen);
??? GetChar();
???
??? while (readlen>0)
??? {
??????? int Inputnumber = 0;
??????? scanf("%d", &inputnumber);
??????? GetChar();
???????
??????? Handlerdata(Arrdir,inputnumber);
???????
??????? --readlen;
??? }
???
??? return 0;
}
//working with Data
Static void Handlerdata (Char *arrdir,int Inputnumber)
{
??? if (Inputnumber = = 0)
??? {
??????? printf("o\n");
??????? return;
??? }
???
??? while (Inputnumber > 0)
??? {
??????? int tmpindex = inputnumber% Ten;
??????? printf("%c", Arrdir[tmpindex]);
??????? Inputnumber = Inputnumber/ Ten;
??? }
??? printf("\ n");
}
?? Recommended program:?
#include <cstdio>
Char str[]= "oottffssent";
void Show (int t)
{
???? if (t) {putchar (* (STR+T%10)); show (T/10);}
}
int main ()
{
???? int n,t;
??????? scanf ("%d", &t);
???? while (t--)
???? {
????????? scanf ("%d", &n);
????????? Show (n);p UTS ("");
???? }
} ? ? ? ? ? ? ? ?
36-Language Introduction-36-count