結果

問題 No.383 レーティング
ユーザー GrenacheGrenache
提出日時 2016-07-01 22:22:05
言語 Java21
(openjdk 21)
結果
AC  
実行時間 145 ms / 2,000 ms
コード長 572 bytes
コンパイル時間 3,641 ms
コンパイル使用メモリ 74,640 KB
実行使用メモリ 41,756 KB
最終ジャッジ日時 2024-04-20 05:07:46
合計ジャッジ時間 6,262 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 131 ms
41,460 KB
testcase_01 AC 140 ms
41,336 KB
testcase_02 AC 136 ms
41,104 KB
testcase_03 AC 145 ms
41,188 KB
testcase_04 AC 137 ms
41,232 KB
testcase_05 AC 133 ms
41,408 KB
testcase_06 AC 135 ms
41,536 KB
testcase_07 AC 134 ms
41,208 KB
testcase_08 AC 129 ms
41,756 KB
testcase_09 AC 136 ms
41,488 KB
testcase_10 AC 137 ms
41,088 KB
testcase_11 AC 112 ms
41,280 KB
testcase_12 AC 139 ms
41,196 KB
testcase_13 AC 139 ms
41,192 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.*;


public class Main_yukicoder383 {

    public static void main(String[] args) {
    	Scanner sc = new Scanner(System.in);
    	Printer pr = new Printer(System.out);

    	int a = sc.nextInt();
    	int b = sc.nextInt();

    	if (b > a) {
    		pr.printf("+%d\n", b - a);
    	} else if (b < a) {
    		pr.printf("-%d\n", a - b);
    	} else {
    		pr.printf("%d\n", 0);
    	}


        pr.close();
        sc.close();
    }

	private static class Printer extends PrintWriter {
		Printer(PrintStream out) {
			super(out);
		}
	}
}
0