結果

問題 No.383 レーティング
ユーザー TatsuDXTatsuDX
提出日時 2016-09-03 14:37:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 330 bytes
コンパイル時間 2,978 ms
コンパイル使用メモリ 76,236 KB
実行使用メモリ 54,996 KB
最終ジャッジ日時 2024-04-27 15:19:24
合計ジャッジ時間 5,361 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 117 ms
53,036 KB
testcase_01 AC 128 ms
54,404 KB
testcase_02 AC 103 ms
52,672 KB
testcase_03 AC 127 ms
53,996 KB
testcase_04 AC 128 ms
54,264 KB
testcase_05 AC 109 ms
52,748 KB
testcase_06 AC 127 ms
54,264 KB
testcase_07 AC 114 ms
53,028 KB
testcase_08 AC 112 ms
53,036 KB
testcase_09 AC 124 ms
54,132 KB
testcase_10 AC 113 ms
54,996 KB
testcase_11 AC 128 ms
54,492 KB
testcase_12 AC 117 ms
53,052 KB
testcase_13 AC 133 ms
54,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Test {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt(), m = sc.nextInt();
		if (n == m) {
			System.out.println(0);
		} else if (n < m) {
			System.out.println("+" + (m - n));
		} else {
			System.out.println("-" + (n - m));
		}
	}
}
0