結果

問題 No.383 レーティング
ユーザー YOSHIYOSHI
提出日時 2021-03-12 22:25:32
言語 Java21
(openjdk 21)
結果
AC  
実行時間 76 ms / 2,000 ms
コード長 542 bytes
コンパイル時間 3,395 ms
コンパイル使用メモリ 76,084 KB
実行使用メモリ 38,176 KB
最終ジャッジ日時 2024-04-22 13:28:32
合計ジャッジ時間 5,116 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
37,780 KB
testcase_01 AC 66 ms
37,672 KB
testcase_02 AC 51 ms
36,760 KB
testcase_03 AC 72 ms
37,624 KB
testcase_04 AC 74 ms
37,748 KB
testcase_05 AC 68 ms
37,420 KB
testcase_06 AC 67 ms
37,536 KB
testcase_07 AC 65 ms
37,256 KB
testcase_08 AC 68 ms
38,004 KB
testcase_09 AC 69 ms
37,816 KB
testcase_10 AC 76 ms
37,628 KB
testcase_11 AC 67 ms
38,008 KB
testcase_12 AC 69 ms
38,176 KB
testcase_13 AC 74 ms
38,048 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No00000383_Main2 {
	static BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
	public static void main(String[] args) throws IOException {
		String[] arr = br.readLine().split(" ");
		int a = Integer.parseInt(arr[0]);
		int b = Integer.parseInt(arr[1]);
		if(a < b) {
			System.out.println("+" + (b - a));
		} else if(a > b) {
			System.out.println("-" + (a - b));
		} else {
			System.out.println("0");
		}
	}
}
0