結果

問題 No.383 レーティング
ユーザー mits58mits58
提出日時 2016-07-02 00:13:35
言語 Java21
(openjdk 21)
結果
AC  
実行時間 165 ms / 2,000 ms
コード長 335 bytes
コンパイル時間 2,323 ms
コンパイル使用メモリ 76,300 KB
実行使用メモリ 41,884 KB
最終ジャッジ日時 2024-04-20 06:22:59
合計ジャッジ時間 5,098 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 165 ms
41,864 KB
testcase_01 AC 127 ms
41,488 KB
testcase_02 AC 137 ms
41,200 KB
testcase_03 AC 121 ms
41,732 KB
testcase_04 AC 127 ms
41,428 KB
testcase_05 AC 141 ms
41,884 KB
testcase_06 AC 126 ms
41,524 KB
testcase_07 AC 136 ms
41,544 KB
testcase_08 AC 130 ms
41,012 KB
testcase_09 AC 155 ms
41,580 KB
testcase_10 AC 140 ms
41,780 KB
testcase_11 AC 137 ms
41,460 KB
testcase_12 AC 117 ms
41,228 KB
testcase_13 AC 113 ms
41,260 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