結果

問題 No.3032 Unavailability of Inequality Signs
ユーザー GrenacheGrenache
提出日時 2018-04-01 22:20:44
言語 Java21
(openjdk 21)
結果
AC  
実行時間 149 ms / 2,000 ms
コード長 960 bytes
コンパイル時間 3,461 ms
コンパイル使用メモリ 73,068 KB
実行使用メモリ 56,008 KB
最終ジャッジ日時 2023-09-08 12:39:02
合計ジャッジ時間 5,405 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
55,648 KB
testcase_01 AC 124 ms
55,608 KB
testcase_02 AC 124 ms
55,576 KB
testcase_03 AC 124 ms
55,436 KB
testcase_04 AC 124 ms
55,844 KB
testcase_05 AC 132 ms
55,920 KB
testcase_06 AC 141 ms
55,980 KB
testcase_07 AC 133 ms
55,664 KB
testcase_08 AC 138 ms
55,828 KB
testcase_09 AC 149 ms
56,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder3032 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		char lt = (char)('=' - 1);
		char gt = (char)('=' + 1);

		int n = sc.nextInt();

		for (int i = 0; i != n; i++) {
			int a = sc.nextInt();
			int b = sc.nextInt();

			int comp = Integer.compare(a, b);

			if (comp == 0) {
				pr.println('=');
			} else if (Integer.toString(comp).toCharArray()[0] == '-') {
				pr.println(lt);
			} else {
				pr.println(gt);
			}
		}
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(INPUT == null ? System.in : new ByteArrayInputStream(INPUT.getBytes()));
		pr = new Printer(System.out);

		solve();

//		pr.close();
		pr.flush();
//		sc.close();
	}

	static String INPUT = null;

	private static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
0