結果

問題 No.383 レーティング
ユーザー Tsukasa_TypeTsukasa_Type
提出日時 2018-02-09 19:40:21
言語 Java21
(openjdk 21)
結果
AC  
実行時間 158 ms / 2,000 ms
コード長 325 bytes
コンパイル時間 3,049 ms
コンパイル使用メモリ 76,860 KB
実行使用メモリ 41,708 KB
最終ジャッジ日時 2024-04-16 22:10:21
合計ジャッジ時間 5,401 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 155 ms
41,600 KB
testcase_01 AC 137 ms
41,260 KB
testcase_02 AC 137 ms
41,200 KB
testcase_03 AC 157 ms
41,680 KB
testcase_04 AC 138 ms
41,324 KB
testcase_05 AC 158 ms
41,708 KB
testcase_06 AC 158 ms
41,680 KB
testcase_07 AC 154 ms
41,548 KB
testcase_08 AC 144 ms
41,572 KB
testcase_09 AC 155 ms
41,604 KB
testcase_10 AC 158 ms
41,708 KB
testcase_11 AC 147 ms
41,140 KB
testcase_12 AC 139 ms
41,220 KB
testcase_13 AC 136 ms
41,364 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

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