結果

問題 No.383 レーティング
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2016-11-11 02:55:17
言語 Java21
(openjdk 21)
結果
AC  
実行時間 139 ms / 2,000 ms
コード長 337 bytes
コンパイル時間 1,974 ms
コンパイル使用メモリ 76,976 KB
実行使用メモリ 41,792 KB
最終ジャッジ日時 2024-05-04 01:46:55
合計ジャッジ時間 4,587 ms
ジャッジサーバーID
(参考情報)
judge5 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
40,488 KB
testcase_01 AC 114 ms
41,324 KB
testcase_02 AC 115 ms
41,764 KB
testcase_03 AC 139 ms
41,792 KB
testcase_04 AC 122 ms
41,152 KB
testcase_05 AC 121 ms
40,696 KB
testcase_06 AC 130 ms
41,640 KB
testcase_07 AC 130 ms
41,524 KB
testcase_08 AC 114 ms
41,444 KB
testcase_09 AC 129 ms
41,088 KB
testcase_10 AC 119 ms
40,564 KB
testcase_11 AC 114 ms
41,132 KB
testcase_12 AC 116 ms
41,544 KB
testcase_13 AC 104 ms
39,884 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = b-a;
        if(c>0){
            System.out.println("+" + c);
        }else{
            System.out.println(c);
        }
    }
}
0