結果

問題 No.383 レーティング
ユーザー ontama_12ontama_12
提出日時 2016-09-23 09:58:27
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 456 bytes
コンパイル時間 2,244 ms
コンパイル使用メモリ 85,572 KB
実行使用メモリ 54,420 KB
最終ジャッジ日時 2024-04-28 21:24:36
合計ジャッジ時間 5,061 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 152 ms
41,720 KB
testcase_01 AC 136 ms
41,440 KB
testcase_02 WA -
testcase_03 AC 148 ms
41,768 KB
testcase_04 AC 135 ms
41,248 KB
testcase_05 AC 149 ms
41,796 KB
testcase_06 AC 151 ms
41,836 KB
testcase_07 AC 152 ms
41,672 KB
testcase_08 AC 134 ms
41,812 KB
testcase_09 AC 137 ms
41,636 KB
testcase_10 AC 151 ms
41,380 KB
testcase_11 AC 134 ms
41,016 KB
testcase_12 AC 135 ms
41,236 KB
testcase_13 AC 136 ms
41,256 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();
       
        int change = b-a;
        
        if(change>=0){
        	System.out.println("+" + change);
        }
        else if(change==0){
        	System.out.println(0);
        }
        else{
        	System.out.println(change);
        }
    }
}
0