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 ...
随机推荐
- RESTful API 设计最佳实践(转)
摘要:目前互联网上充斥着大量的关于RESTful API(为了方便,以后API和RESTful API 一个意思)如何设计的文章,然而却没有一个”万能“的设计标准:如何鉴权?API格式如何?你的API ...
- vimdiff
[vimdiff] 启动方法 首先保证系统中的diff命令是可用的.Vim的diff模式是依赖于diff命令的.Vimdiff的基本用法就是: # vimdiff FILE_LEFT FILE_RIG ...
- LeetCode292:Nim Game
You are playing the following Nim Game with your friend: There is a heap of stones on the table, eac ...
- AJAX小练习,防止以后忘记
<div id="content"> <input id="btnShow" type="button" value=&q ...
- oradmin相关用法
[转]oradmin相关用法 创建例程: -NEW -SID sid | -SRVC 服务 [-INTPWD 口令] [-MAXUSERS 数量] [-STARTMODE a|m] [-PFILE 文 ...
- UVa 297 - Quadtrees
题目:利用四叉树处理图片,给你两张黑白图片的四叉树,问两张图片叠加后黑色的面积. 分析:搜索.数据结构.把图片分成1024块1*1的小正方形,建立一位数组记录对应小正方形的颜色. 利用递归根据字符串, ...
- hdu 5407
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=5407 题意:给定一个数n,求LCM(C(n,0),C(n,1),C(n,2)...,C(n,n)) 根 ...
- easyui 表单和自定义验证扩展和js自定义返回值
================jsp==========================<form method="post" id="regfrminp&qu ...
- PowerDesigner 12.5 反向工程sql server
一.设置数据源 1.控制面板 >> 数据源(ODBC)
- ASP.NET MVC- KindEditor的使用
我用过几个EDITOR,还是比较喜欢KINDEDITOR.这个工作可能最近要用到了,周末在家花时间了解了一下.做了一下备注在这里,以备日后方便查阅. 1.首先去KINDEDITOR的官网下载最新的版本 ...