結果

問題 No.383 レーティング
ユーザー h_tyokinuhatah_tyokinuhata
提出日時 2016-10-31 13:08:57
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 334 bytes
コンパイル時間 2,072 ms
コンパイル使用メモリ 73,140 KB
実行使用メモリ 56,732 KB
最終ジャッジ日時 2023-08-16 11:39:00
合計ジャッジ時間 5,753 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 137 ms
55,948 KB
testcase_01 AC 137 ms
55,660 KB
testcase_02 AC 124 ms
55,916 KB
testcase_03 AC 139 ms
55,860 KB
testcase_04 AC 136 ms
55,724 KB
testcase_05 AC 138 ms
55,756 KB
testcase_06 AC 136 ms
53,888 KB
testcase_07 AC 139 ms
55,728 KB
testcase_08 AC 136 ms
56,180 KB
testcase_09 AC 135 ms
56,200 KB
testcase_10 AC 137 ms
55,816 KB
testcase_11 AC 138 ms
55,716 KB
testcase_12 AC 138 ms
55,888 KB
testcase_13 AC 137 ms
56,732 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);

    	int a = sc.nextInt(), b = sc.nextInt();
    	
    	if(a < b)		System.out.println("+" + (b - a));
    	else if(a > b)	System.out.println("-" + (a - b));
    	else			System.out.println(0);
    }
}
0