A == B ?
Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 72556 Accepted Submission(s): 11427
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
Author
8600 && xhd
Source
Recommend
linle | We have carefully selected several similar problems for you: 2057 2050 1096 1091 2074
比起c选手,只有在做大数的时候,有一种自然而然的优越感
import java.io.*; import java.math.BigDecimal; import java.util.*; public class Main { public static void main(String[] args) { // TODO Auto-generated method stub Scanner input = new Scanner(System.in); while(input.hasNext()) { BigDecimal a = input.nextBigDecimal(); BigDecimal b = input.nextBigDecimal(); if(a.compareTo(b)!=0) { System.out.println("NO"); } else { System.out.println("YES"); } } } }
时间: 2024-10-07 12:40:25