結果

問題 No.383 レーティング
ユーザー yamax3232yamax3232
提出日時 2017-02-15 20:12:04
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 389 bytes
コンパイル時間 3,271 ms
コンパイル使用メモリ 72,076 KB
実行使用メモリ 56,280 KB
最終ジャッジ日時 2023-08-28 17:26:25
合計ジャッジ時間 5,272 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 119 ms
55,820 KB
testcase_01 AC 118 ms
55,876 KB
testcase_02 WA -
testcase_03 AC 117 ms
55,760 KB
testcase_04 AC 118 ms
55,864 KB
testcase_05 AC 117 ms
56,048 KB
testcase_06 AC 116 ms
55,932 KB
testcase_07 AC 117 ms
55,820 KB
testcase_08 AC 116 ms
56,172 KB
testcase_09 AC 116 ms
55,420 KB
testcase_10 AC 115 ms
56,088 KB
testcase_11 AC 116 ms
55,792 KB
testcase_12 AC 117 ms
55,984 KB
testcase_13 AC 116 ms
56,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Rating {

	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ
Scanner kb=new Scanner(System.in);
int a=kb.nextInt(),b=kb.nextInt();
if(a<b){
	System.out.print("+");
}else if(a>b){
	System.out.print("-");
	b*=-1;
	a*=-1;
}else{
	System.out.print("0");
}


System.out.printf("%d",b-a);
kb.close();
	}

}

0