結果

問題 No.383 レーティング
ユーザー yuma_shobon1108
提出日時 2016-11-18 11:24:21
言語 Java
(openjdk 23)
結果
AC  
実行時間 122 ms / 2,000 ms
コード長 388 bytes
コンパイル時間 3,779 ms
コンパイル使用メモリ 76,304 KB
実行使用メモリ 41,472 KB
最終ジャッジ日時 2024-11-26 05:52:09
合計ジャッジ時間 5,390 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

class Question383
{
	public static void main(String[] str)
	{
	
		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		

		if(b-a > 0){
			System.out.println("+"+Integer.toString(Math.abs(a-b)));
		}
		else if(b-a < 0){
			System.out.println("-"+Integer.toString(a-b));
		}
		else{
			System.out.println("0");
		}
	}
}
0