Balloon Comes!
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!
#include <stdio.h> int main(){
int T;
char c;
int a;
int b; scanf("%d",&T); while(T--){
getchar(); scanf("%c%d%d",&c,&a,&b); if(c=='+')
printf("%d\n",a+b); else if(c=='-')
printf("%d\n",a-b); else if(c=='*')
printf("%d\n",a*b); else if(c=='/'){
if(a%b!=)
printf("%.2lf\n",(double)a/b); else
printf("%d\n",a/b);
}
}
return ;
}
Balloon Comes!的更多相关文章
- HDOJ 1004 Let the Balloon Rise
Problem Description Contest time again! How excited it is to see balloons floating around. But to te ...
- hdu 1004 Let the Balloon Rise
Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Oth ...
- 【ZOJ1003】Crashing Balloon(DFS)
Crashing Balloon Time Limit: 2 Seconds Memory Limit: 65536 KB On every June 1st, the Children's ...
- Let the Balloon Rise
Problem Description Contest time again! How excited it is to see balloons floating around. But to te ...
- 杭电1170 Balloon Comes
Problem Description The contest starts now! How excited it is to see balloons floating around. You, ...
- Let the Balloon Rise 分类: HDU 2015-06-19 19:11 7人阅读 评论(0) 收藏
Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Oth ...
- HDU 1004 Let the Balloon Rise map
Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Oth ...
- HDU1004 Let the Balloon Rise(map的简单用法)
Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others ...
- jQuery:balloon气泡提示插件
插件下载地址:http://file.urin.take-uma.net/jquery.balloon.js-Demo.html <!DOCTYPE html PUBLIC "-//W ...
- HD1004Let the Balloon Rise
Let the Balloon Rise Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others ...
随机推荐
- IDE Plug
IDE Plug 使用 cnpack提供的IDE External Wizard Management 管理插件.添加插件.删除插件 Cnpack D:\Program Files (x86)\CnP ...
- bpl
RegisterClass LoadPackage Getprocaddress FindClass UnRegisterModuleClasses UnloadPackage
- linux top命令VIRT,RES,SHR,DATA的含义
VIRT:virtual memory usage 虚拟内存1.进程“需要的”虚拟内存大小,包括进程使用的库.代码.数据等2.假如进程申请100m的内存,但实际只使用了10m,那么它会增长100m,而 ...
- Linux下的sort排序命令详解(二)
有时候学习脚本,你会发现sort命令后面跟了一堆类似-k1,2,或者-k1.2 -k3.4的东东,有些匪夷所思.今天,我们就来搞定它—-k选项! 1 准备素材 [root@FDMdevBI opt]# ...
- oracle 去掉空格
trim(value) 去掉左右空格 ltrim(value) 去掉左空格 rtrim(value) 去掉右空格
- ESP8266调试问题
1 串口连接电脑调试时,GPIO15必须接地,否则没响应 2发送退出透传指令“+++”时,必须取消勾选发送新行.发送别的指令时须勾选. 另外若所刷固件版本为[Vendor:www.ai-thinker ...
- Keil MDK Code、RO-data、RW-data、ZI-data数据段
Program Size: Code=10848 RO-data=780 RW-data=372 ZI-data=868 Code 表示程序代码指令部分 存放在Flash区 RO-data 表 ...
- 代码中设置excel自定义格式为[红色]的处理方法
有时候,excel的自定义格式设置时 ,会遇到需要设置为¥#,##0;[红色]¥-#,##0的格式. 其中会带一个颜色标记,但是如果这样的一句代码,放在英文版的Office里面,就失效了,因为英文版应 ...
- hdoj 5317 RGCDQ
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5317 #include<stdio.h> ; int F[MAXN]; bool flag ...
- 使用struts dojo ajax源码案例
我这里使用的jar 包struts2-dojo-plugin-2.2.1.1.jar ===========jsp======================= <%@ taglib prefi ...