結果

問題 No.780 オフ会
ユーザー shinwisteriashinwisteria
提出日時 2019-01-20 22:05:17
言語 Java19
(openjdk 21)
結果
WA  
実行時間 -
コード長 346 bytes
コンパイル時間 5,043 ms
コンパイル使用メモリ 72,112 KB
実行使用メモリ 57,740 KB
最終ジャッジ日時 2023-10-12 02:06:37
合計ジャッジ時間 7,564 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
57,740 KB
testcase_01 AC 119 ms
55,744 KB
testcase_02 AC 122 ms
55,952 KB
testcase_03 AC 120 ms
55,508 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 123 ms
56,032 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 119 ms
55,992 KB
testcase_10 AC 121 ms
56,108 KB
testcase_11 WA -
testcase_12 AC 123 ms
56,168 KB
testcase_13 AC 121 ms
55,676 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 119 ms
55,996 KB
testcase_17 AC 120 ms
56,056 KB
testcase_18 WA -
testcase_19 AC 129 ms
55,540 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class No780 {

	public static void main(String[] args) {
		Scanner s = new Scanner(System.in);
		int A = s.nextInt();
		int B = s.nextInt();
		s.close();
		if(A + 1 <= B){
			System.out.println("YES");
			System.out.println("0");
		}else{
			System.out.println("NO");
			System.out.println(A + 1 -B);
		}

	}

}
0