結果

問題 No.383 レーティング
ユーザー bellbell
提出日時 2021-02-17 23:04:18
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 336 bytes
コンパイル時間 2,763 ms
コンパイル使用メモリ 72,228 KB
実行使用メモリ 56,600 KB
最終ジャッジ日時 2023-10-12 08:54:16
合計ジャッジ時間 4,918 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 135 ms
56,140 KB
testcase_01 AC 136 ms
55,844 KB
testcase_02 AC 118 ms
56,356 KB
testcase_03 AC 135 ms
55,556 KB
testcase_04 AC 138 ms
56,332 KB
testcase_05 AC 135 ms
55,896 KB
testcase_06 AC 135 ms
56,024 KB
testcase_07 AC 135 ms
56,240 KB
testcase_08 AC 135 ms
56,084 KB
testcase_09 AC 138 ms
53,796 KB
testcase_10 AC 138 ms
55,900 KB
testcase_11 AC 135 ms
56,600 KB
testcase_12 AC 139 ms
55,592 KB
testcase_13 AC 136 ms
55,980 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {

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