[Hdoj]_2081_ Phone cornet

Source: Internet
Author: User

Topic:

Problem description As we all know, mobile phone number is a 11-bit long digital string, at the same time, as a student, you can also apply to join the campus network, if you join the success, you will have another cornet. Suppose all the cornet is the 6+ mobile phone number of the latter 5, such as the number 13512345678 mobile phone, the corresponding cornet is 645678. Now, if I give you a 11-bit long mobile phone number, can you find the corresponding cornet? The first line of input data is an n (n <= 200), which indicates that there are n data, and the next N rows each act on a 11-bit mobile phone number The output should include N rows, each containing a corresponding cornet, and the output should match the input order. Sample input21351234567813787654321sample OUTPUT645678654321SOURCE2006/1/15 ACM Program Design Final Exam Recommendlcy

Code:

#include <stdio.h>intMainvoid) {unsignedintT, I;  for(SCANF ("%u", &t); T --T) { for(i =1; I <=7; ++i) {GetChar (); } printf ("6");  for(i =1; I <=5; ++i) {printf ("%c", GetChar ()); } printf ("\ n"); }    return 0;}

[Hdoj]_2081_ Phone cornet

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.