結果

問題 No.780 オフ会
ユーザー Yosuke YamaguchiYosuke Yamaguchi
提出日時 2021-01-20 10:04:19
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 541 bytes
コンパイル時間 4,560 ms
コンパイル使用メモリ 72,568 KB
実行使用メモリ 56,020 KB
最終ジャッジ日時 2023-08-23 13:20:09
合計ジャッジ時間 8,368 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,788 KB
testcase_01 AC 119 ms
55,364 KB
testcase_02 AC 118 ms
55,992 KB
testcase_03 AC 119 ms
55,368 KB
testcase_04 AC 120 ms
53,764 KB
testcase_05 AC 117 ms
55,684 KB
testcase_06 AC 118 ms
55,756 KB
testcase_07 AC 120 ms
55,688 KB
testcase_08 AC 119 ms
55,968 KB
testcase_09 AC 119 ms
56,020 KB
testcase_10 AC 120 ms
55,572 KB
testcase_11 AC 121 ms
55,440 KB
testcase_12 AC 118 ms
55,632 KB
testcase_13 AC 118 ms
55,740 KB
testcase_14 AC 119 ms
55,836 KB
testcase_15 AC 119 ms
55,588 KB
testcase_16 AC 118 ms
55,700 KB
testcase_17 AC 117 ms
55,696 KB
testcase_18 AC 120 ms
55,512 KB
testcase_19 AC 119 ms
55,968 KB
testcase_20 AC 120 ms
55,884 KB
testcase_21 AC 120 ms
55,660 KB
testcase_22 AC 120 ms
55,372 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

// https://yukicoder.me/problems/no/780
public class OfflineParty780 {
  public static void main(String[] args) {
    // 標準入力から読み込む際に、Scan
    Scanner sc = new Scanner(System.in);

    // String 1つ分を読み込む
    int a = Integer.parseInt(sc.next());
    int b = Integer.parseInt(sc.next());
    if (b - a >= 1) {
      System.out.println("YES");
      System.out.println(b - a - 1);
    } else {
      System.out.println("NO");
      System.out.println(a - b + 1);
    }

  }
}
0