11547 - Automatic Answer
来源:互联网 发布:ae mac中文破解版种子 编辑:程序博客网 时间:2024/06/05 08:03
Problem A
AUTOMATIC ANSWER
Last month Alice nonchalantly entered her name in a draw for a Tapmaster 4000. Upon checking her mail today, she found a letter that read:
“Congratulations, Alice! You have won a Tapmaster 4000. To claim your prize, you must answer the following skill testing question.”
Alice’s initial feelings of surprised joy turned quickly to those of dismay. Her lifetime record for skill testing questions is an abysmal 3 right and 42 wrong.
Mad Skills, the leading skill testing question development company, was hired to provide skill testing questions for this particular Tapmaster 4000 draw. They decided to create a different skill testing question to each winner so that the winners could not collaborate to answer 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) on a line by itself. This nshould be substituted into the skill testing question below.
Program Output
For each test case, output the answer to the following skill testing question on a line by itself: “Multiply n by 567, then divide the result by 9, then add 7492, then multiply by 235, then divide by 47, then subtract 498. What is the digit in the tens column?”
Sample Input & Output
INPUT
2637-120
OUTPUT13
#include <stdio.h> int main() { int t,n;scanf("%d",&t);while(t--){scanf("%d",&n);n=(n*567/9+7492)*235/47-498;if(n<0) n=-n;printf("%d\n",n/10-(n/100)*10);} return 0; }
- UVa 11547 - Automatic Answer
- 11547 - Automatic Answer
- UVa 11547 Automatic Answer (water ver.)
- How Did Watson Answer —— Automatic Knowledge Acquisition
- Answer
- answer
- Automatic and No automatic
- Answer Wisely
- shell answer
- Automatic Poetry
- Automatic Login
- Automatic Scripts
- Automatic differentiation
- Automatic Poetry
- Automatic Poetry
- Automatic Poetry
- Automatic Editing
- Automatic Poetry
- Java NIO框架之Mina、Netty、Grizzly介绍与对比
- bdf和df查看linus/unix系统空间使用情况
- 商品管理系统课程设计
- Android GridView 设置指定项被选中的背景图片并滚动到指定项(如果带有滚动条)
- IOS学习——自定义UITableViewCell
- 11547 - Automatic Answer
- H.264 代码下载,以及配置为FFMPEG的解码库
- getopt()和getopt_long()用法
- C# Socket编程
- 类 成员访问方法
- 第60天的交易(2013-6-26)(-100)(-441.3)
- ubuntu 安装SSH服务器
- 两种方式复制一个mp3文件
- poj 1088 滑雪(贪心算法)