結果

問題 No.383 レーティング
ユーザー k_kangbomk_kangbom
提出日時 2016-07-07 07:55:34
言語 Java21
(openjdk 21)
結果
AC  
実行時間 152 ms / 2,000 ms
コード長 543 bytes
コンパイル時間 2,679 ms
コンパイル使用メモリ 76,820 KB
実行使用メモリ 41,976 KB
最終ジャッジ日時 2024-04-21 00:39:43
合計ジャッジ時間 4,993 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 152 ms
41,724 KB
testcase_01 AC 131 ms
41,616 KB
testcase_02 AC 128 ms
41,556 KB
testcase_03 AC 146 ms
41,424 KB
testcase_04 AC 116 ms
40,192 KB
testcase_05 AC 132 ms
40,312 KB
testcase_06 AC 148 ms
41,704 KB
testcase_07 AC 148 ms
41,976 KB
testcase_08 AC 130 ms
41,144 KB
testcase_09 AC 145 ms
41,688 KB
testcase_10 AC 145 ms
41,376 KB
testcase_11 AC 131 ms
41,828 KB
testcase_12 AC 132 ms
41,792 KB
testcase_13 AC 137 ms
41,300 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        // 標準入力から読み込む際に、Scannerオブジェクトを使う。
        Scanner sc = new Scanner(System.in);

        // int 1つ分を読み込む
        int a = sc.nextInt();

        // int 1つ分を読み込む
        int b = sc.nextInt();
        // 標準出力に書き出す。
        if(b>a){
        System.out.println("+"+(b-a));
        }
        else{
            System.out.println(b-a);
        }
    }
}
0