UVa 11547 Automatic Answer (Water ver.)

Source: Internet
Author: User
Tags time limit

11547-automatic Answer

Time limit:1.000 seconds

Http://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=24&page=show_problem &problem=2542

Last month Alice nonchalantly entered her name in a draw for a tapmaster 4000. Upon checking her mail today, she found a letter this read:

"Congratulations, alice! You have won a Tapmaster 4000. To claim your prize, you must answer the following skill the testing.

Alice ' s initial feelings of surprised joy turned quickly to those of dismay. Her lifetime record for skill testing questions is a abysmal 3 right and wrong.

Mad Skills, the leading skill testing question development company, is hired to provide skill testing Particular Tapmaster 4000 draw. They decided to create a different skill testing question to all winner so this winners could not collaborate to ANSW Er the question.

Can you help Alice win the Tapmaster 4000 by solving the skill testing question?

Program Input

The input begins with T (1≤t≤100), the number of test cases. Each test case contains an integer n ( -1000≤n≤1000) in a line by itself. This n should is substituted into the skill testing question below.

Program Output

This article URL address: http://www.bianceng.cn/Programming/sjjg/201410/45355.htm

For each test case, output the answer to the following skill testing question on a line by itself: "Multiply N by 567, the n Divide the result by 9, then add 7492, then multiply through 235, then divide by, then subtract 498. What is the digit in the Tens column?

Sample Input & Output

INPUT

2637-120

OUTPUT

1
3

Complete code:

/*0.016s*/
    
#include <cstdio>  
#include <cstdlib>  
    
int main ()  
{  
    int t, N;  
    scanf ("%d", &t);  
    while (t--)  
    {  
        scanf ("%d", &n);  
        printf ("%d\n", ABS (315 * n + 36962)/%);  
    }  
    return 0;  
}

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.