結果

問題 No.383 レーティング
ユーザー mits58mits58
提出日時 2016-07-02 00:13:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 5,039 ms
コンパイル使用メモリ 73,984 KB
実行使用メモリ 55,968 KB
最終ジャッジ日時 2023-08-02 06:31:15
合計ジャッジ時間 5,276 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,780 KB
testcase_01 AC 106 ms
55,428 KB
testcase_02 AC 109 ms
55,812 KB
testcase_03 AC 127 ms
55,836 KB
testcase_04 AC 113 ms
53,908 KB
testcase_05 AC 129 ms
55,956 KB
testcase_06 AC 126 ms
55,724 KB
testcase_07 AC 125 ms
55,936 KB
testcase_08 AC 111 ms
55,644 KB
testcase_09 AC 128 ms
55,736 KB
testcase_10 AC 128 ms
55,648 KB
testcase_11 AC 118 ms
55,968 KB
testcase_12 AC 115 ms
55,388 KB
testcase_13 AC 112 ms
55,412 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main{
	public static void main(String[] args){
		Scanner sc=new Scanner(System.in);
		while(sc.hasNext()){
			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