結果

問題 No.780 オフ会
ユーザー shinwisteriashinwisteria
提出日時 2019-01-20 22:07:40
言語 Java21
(openjdk 21)
結果
AC  
実行時間 131 ms / 2,000 ms
コード長 352 bytes
コンパイル時間 3,523 ms
コンパイル使用メモリ 71,708 KB
実行使用メモリ 55,920 KB
最終ジャッジ日時 2023-10-12 02:10:03
合計ジャッジ時間 7,843 ms
ジャッジサーバーID
(参考情報)
judge12 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
55,760 KB
testcase_01 AC 129 ms
55,632 KB
testcase_02 AC 130 ms
55,920 KB
testcase_03 AC 131 ms
55,660 KB
testcase_04 AC 128 ms
55,428 KB
testcase_05 AC 127 ms
55,600 KB
testcase_06 AC 128 ms
55,648 KB
testcase_07 AC 126 ms
53,372 KB
testcase_08 AC 128 ms
55,644 KB
testcase_09 AC 128 ms
55,680 KB
testcase_10 AC 128 ms
55,568 KB
testcase_11 AC 131 ms
55,712 KB
testcase_12 AC 127 ms
55,812 KB
testcase_13 AC 129 ms
55,688 KB
testcase_14 AC 129 ms
55,712 KB
testcase_15 AC 127 ms
55,736 KB
testcase_16 AC 127 ms
55,604 KB
testcase_17 AC 128 ms
55,600 KB
testcase_18 AC 129 ms
55,648 KB
testcase_19 AC 129 ms
55,604 KB
testcase_20 AC 130 ms
55,652 KB
testcase_21 AC 130 ms
55,592 KB
testcase_22 AC 131 ms
55,624 KB
権限があれば一括ダウンロードができます

ソースコード

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(B - A - 1);
		}else{
			System.out.println("NO");
			System.out.println(A + 1 -B);
		}

	}

}
0