結果

問題 No.383 レーティング
ユーザー ontama_12ontama_12
提出日時 2016-09-23 10:05:52
言語 Java21
(openjdk 21)
結果
AC  
実行時間 155 ms / 2,000 ms
コード長 415 bytes
コンパイル時間 2,273 ms
コンパイル使用メモリ 76,032 KB
実行使用メモリ 41,596 KB
最終ジャッジ日時 2024-04-28 21:24:42
合計ジャッジ時間 5,123 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 151 ms
41,492 KB
testcase_01 AC 133 ms
40,868 KB
testcase_02 AC 133 ms
41,216 KB
testcase_03 AC 154 ms
41,404 KB
testcase_04 AC 137 ms
40,868 KB
testcase_05 AC 151 ms
41,240 KB
testcase_06 AC 151 ms
41,396 KB
testcase_07 AC 150 ms
41,556 KB
testcase_08 AC 137 ms
41,068 KB
testcase_09 AC 155 ms
41,596 KB
testcase_10 AC 153 ms
41,416 KB
testcase_11 AC 134 ms
41,400 KB
testcase_12 AC 140 ms
41,428 KB
testcase_13 AC 133 ms
41,324 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();
        int b = sc.nextInt();
       
        
        if(b>a){
        	System.out.println("+" + (b-a));
        }
        else if(b==a){
        	System.out.println(0);
        }
        else{
        	System.out.println(b-a);
        }
    }
}
0