当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

1170:Balloon Comes!

题目描述
The contest starts now! How excited it is to see balloons floating around. You, one of the best programmers in HDU, can get a very beautiful balloon if only you have solved the very very very... easy problem.
Give you an operator (+,-,*, / --denoting addition, subtraction, multiplication, division respectively) and two positive integers, your task is to output the result.
Is it very easy?
Come on, guy! PLMM will send you a beautiful Balloon right now!
Good Luck!
输入解释
Input contains multiple test cases. The first line of the input is a single integer T (0<T<1000) which is the number of test cases. T test cases follow. Each test case contains a char C (+,-,*, /) and two integers A and B(0<A,B<10000).Of course, we all know that A and B are operands and C is an operator.
输出解释
For each case, print the operation result. The result should be rounded to 2 decimal places If and only if it is not an integer.
输入样例
4
+ 1 2
- 1 2
* 1 2
/ 1 2
输出样例
3
-1
2
0.50
来自杭电HDUOJ的附加信息
Author lcy
Recommend

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-1170

最后修改于 2020-10-25T22:42:39+00:00 由爬虫自动更新

共提交 94

通过率 89.36%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/32768K(Java/Others)