結果
問題 | No.8032 Unavailability of Inequality Signs |
ユーザー |
![]() |
提出日時 | 2018-04-01 22:53:52 |
言語 | Java (openjdk 23) |
結果 |
AC
|
実行時間 | 165 ms / 2,000 ms |
コード長 | 829 bytes |
コンパイル時間 | 2,155 ms |
コンパイル使用メモリ | 74,864 KB |
実行使用メモリ | 41,784 KB |
最終ジャッジ日時 | 2024-06-26 06:02:34 |
合計ジャッジ時間 | 4,400 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 7 |
ソースコード
import java.util.*; import java.math.BigInteger; public class Main { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int i = 0; while(true) { int a = sc.nextInt(); int b = sc.nextInt(); int judge = judge(a,b); if(judge == 0) { System.out.println("="); } else if(judge == 1){ System.out.println((char)(62)); } else { System.out.println((char)(60)); } i++; if(i == n) break; } } static int judge(int a, int b) { BigInteger as = new BigInteger(String.valueOf(a)); BigInteger bs = new BigInteger(String.valueOf(b)); return as.compareTo(bs); } }