HDUOJ - 2054 A == B ?
来源:互联网 发布:软件培训班西安 编辑:程序博客网 时间:2024/05/20 16:44
Problem Description
Give you two numbers A and B, if A is equal to B, you should print "YES", or print "NO".
Input
each test case contains two numbers A and B.
Output
for each case, if A is equal to B, you should print "YES", or print "NO".
Sample Input
1 22 23 34 3
Sample Output
NOYESYESNO用C++写太麻烦了,需要考虑各种情况,前导零,后导零,正负数,整数小数。。。直接用java水过。。。import java.io.*;import java.math.*;import java.util.*;public class Main { public static void main(String[] args) { Scanner cin = new Scanner(System.in); BigDecimal x, y; while(cin.hasNextBigDecimal()){ x = cin.nextBigDecimal().stripTrailingZeros(); y = cin.nextBigDecimal().stripTrailingZeros(); if(x.equals(y)) System.out.println("YES"); else System.out.println("NO"); } }}
0 0
- HDUOJ - 2054 A == B ?
- HDUOJ A+B
- HDUOJ 1228 - A+B
- HDUOJ 1412 - {A} + {B}
- HDUOJ {A}+{B}
- HDUOJ A+B 题目1000
- hduoj 2033 人见人爱A+B
- HDUOJ关于A+B的ti
- HDUOJ 又一版A+B 题目1877
- HDUoj 1576 A/B 扩展欧几里德
- A^B = B^A
- A^B = B^A
- A^B = B^A
- A^B=B^A
- Python a,b=b,a+b
- hduoj As Easy As A+B 题目1040
- hduoj 1002 A + B Problem II(大数加法)
- HDUoj 1412 {A} + {B} ( set &去重函数
- andriod之BroadcastReciever--广播接受者,之初认识
- Android小知识点收集
- yum
- 三层架构
- poj1163 the triangle 题解
- HDUOJ - 2054 A == B ?
- bitnami redmine 安装插件
- iOS开发- SceneKit
- Struts2中action获取request、response、session的方式
- tableview列表中的cell单元格有倒计时的情况处理
- UIActivityViewController的使用(Swift实现)
- HDU - 1011(树形dp 背包类型的做法)
- java中this.static.final关键字的定义
- maven POM.xml 标签详解