結果

問題 No.383 レーティング
ユーザー yuiyui
提出日時 2017-02-20 13:44:30
言語 Java21
(openjdk 21)
結果
AC  
実行時間 132 ms / 2,000 ms
コード長 392 bytes
コンパイル時間 1,896 ms
コンパイル使用メモリ 73,832 KB
実行使用メモリ 56,744 KB
最終ジャッジ日時 2023-08-28 19:41:38
合計ジャッジ時間 4,645 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 130 ms
55,776 KB
testcase_01 AC 129 ms
56,608 KB
testcase_02 AC 115 ms
56,040 KB
testcase_03 AC 129 ms
56,744 KB
testcase_04 AC 130 ms
56,020 KB
testcase_05 AC 129 ms
55,804 KB
testcase_06 AC 129 ms
55,900 KB
testcase_07 AC 130 ms
56,608 KB
testcase_08 AC 130 ms
56,156 KB
testcase_09 AC 132 ms
55,916 KB
testcase_10 AC 131 ms
56,232 KB
testcase_11 AC 130 ms
55,772 KB
testcase_12 AC 129 ms
55,996 KB
testcase_13 AC 130 ms
56,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {

    public static void main(String[] args) {

    	Scanner sc = new Scanner(System.in);
    	int numA = sc.nextInt();
    	int numB = sc.nextInt();
    	if((numA-numB)>0){
    		System.out.println("-" + (numA-numB));
    	}else if(numA==numB){
    		System.out.println(0);
    	}else{
    		System.out.println("+" +(numB-numA));
    	}
    }

}
0