[198]

Source: Internet
Author: User
Time Limit: 3000 MS | memory limit: 65535 kb difficulty: 2
Description

We usually like to count from left to right, but our little white students recently heard that the numbers of Germans are somewhat different from ours. They are just the opposite of ours, from right to left. Therefore, when he sees 123, he will say "321 ".

Now, a German professor is giving a lecture on ACM at Zhengzhou University. Now he hired you to serve as his assistant. He gave you some information to find the pages in the book. Now that you have found the corresponding page number, tell it in English.

To simplify our problem, you only need to return the first letter of a word. (The number 0 is read as the letter O)

Note: Each digit is read independently, so reading data from 11 to double one does not occur.

Input
The input is divided into two parts:
Part 1: an integer T (1 <= T <= 1000)
Part 2: A total of T rows, each with a number. The length of each number cannot exceed 10 characters.
Output
Each group of outputs occupies a single row, and the corresponding output returns the abbreviated Number of pages to the German professor.
Sample Input
2121234
Sample output
TOFTTO
#include<stdio.h>#include<string.h>int main(){int n;char s[100];char c[12]="OOTTFFSSENT";scanf("%d",&n);while(n--){scanf("%s",s);for(int i=strlen(s)-1;i>=0;i--)printf("%c",c[s[i]-'0']);printf("\n");}}
Related Keywords:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.