hdu 2054 A == B ? (java大数)
2014-10-11 14:27
495 查看
A == B ?
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 62507 Accepted Submission(s): 9807
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 2 2 2 3 3 4 3
Sample Output
NO YES YES NO
注意a,b用BIgDecimal
import java.util.*; import java.math.*; public class Main { public static void main(String args[]) { Scanner cin = new Scanner(System.in); BigDecimal a,b; while(cin.hasNextBigDecimal()) { a=cin.nextBigDecimal(); b=cin.nextBigDecimal(); if(a.compareTo(b)==0) System.out.println("YES"); else System.out.println("NO"); } } }
相关文章推荐
- HDU-2054-A == B?(Java大数BigDecimal)
- hdu 2054 A == B ? (java大数)
- HDU 2054 A == B ?(Java大数用equal???C模拟也不能错过)
- How Many Fibs_hdu_1316(大数).java
- hdu 1002 A + B Problem II ( JAVA大数)
- hdu 1250(java大数)
- hdu 1316(java大数)
- hdu 1002(java大数)
- HDU 4577 - X-Boxes(杭州邀请赛B题)(JAVA大数+规律)
- http://acm.hdu.edu.cn/showproblem.php?pid=2303 (素数打表 + java大数取模)
- HDU-1042(大数阶乘_java)
- hdu 1316 How Many Fibs?【JAVA大数】
- hdu 1002 大数之java小试牛刀
- 模拟_大数字符串(HDU_2054)
- 模拟_大数JAVA(HDU_1063)
- hdu 2054 A == B ?【JAVA】
- hdu 1002 java 大数相加
- HDU-2054 A == B? Java
- hdu 1133 卡特兰数的应用 java水大数
- hdu 1316 How Many Fibs?【JAVA大数】