結果

問題 No.383 レーティング
ユーザー TwinkleStar74TwinkleStar74
提出日時 2017-10-03 09:53:43
言語 Java21
(openjdk 21)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 658 bytes
コンパイル時間 3,134 ms
コンパイル使用メモリ 78,840 KB
実行使用メモリ 38,024 KB
最終ジャッジ日時 2024-04-27 22:37:17
合計ジャッジ時間 4,674 ms
ジャッジサーバーID
(参考情報)
judge5 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 69 ms
37,916 KB
testcase_01 AC 50 ms
36,864 KB
testcase_02 AC 51 ms
36,820 KB
testcase_03 AC 70 ms
37,888 KB
testcase_04 AC 53 ms
37,028 KB
testcase_05 AC 67 ms
38,024 KB
testcase_06 AC 67 ms
38,016 KB
testcase_07 AC 66 ms
37,788 KB
testcase_08 AC 51 ms
36,948 KB
testcase_09 AC 71 ms
37,848 KB
testcase_10 AC 67 ms
38,024 KB
testcase_11 AC 51 ms
36,896 KB
testcase_12 AC 50 ms
37,044 KB
testcase_13 AC 50 ms
37,008 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class No383 {
	public static void main(String[] args) {
		try{
			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String[] str = br.readLine().split(" ");
			int before = Integer.parseInt(str[0]);
			int after = Integer.parseInt(str[1]);
			getDifference(before,after);
		}catch(IOException e){
			e.getStackTrace();
		}catch(NumberFormatException e){
			e.getStackTrace();
		}
	}
	
	public static void getDifference(int x, int y){
		int ans = y - x;
		if(x<y) System.out.println("+" + ans);
		else System.out.println(ans);
	}
}
0