結果

問題 No.383 レーティング
ユーザー ohagi_1182ohagi_1182
提出日時 2017-10-13 18:21:39
言語 Java21
(openjdk 21)
結果
AC  
実行時間 151 ms / 2,000 ms
コード長 334 bytes
コンパイル時間 2,335 ms
コンパイル使用メモリ 76,140 KB
実行使用メモリ 54,492 KB
最終ジャッジ日時 2024-04-28 17:32:36
合計ジャッジ時間 5,262 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 149 ms
54,072 KB
testcase_01 AC 132 ms
53,716 KB
testcase_02 AC 133 ms
54,188 KB
testcase_03 AC 150 ms
54,368 KB
testcase_04 AC 131 ms
54,240 KB
testcase_05 AC 149 ms
54,172 KB
testcase_06 AC 151 ms
54,044 KB
testcase_07 AC 150 ms
54,492 KB
testcase_08 AC 135 ms
54,196 KB
testcase_09 AC 147 ms
54,212 KB
testcase_10 AC 147 ms
54,340 KB
testcase_11 AC 132 ms
54,088 KB
testcase_12 AC 132 ms
53,728 KB
testcase_13 AC 134 ms
54,004 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
		int b = sc.nextInt();
		if(b - a > 0) {
			System.out.println("+" + (b - a));
		} else if(b - a < 0) {
			System.out.println(b - a);
		} else {
			System.out.println(0);
		}
	}
}
0