結果

問題 No.780 オフ会
ユーザー iwa_choco_168iwa_choco_168
提出日時 2019-12-06 09:43:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 120 ms / 2,000 ms
コード長 391 bytes
コンパイル時間 2,036 ms
コンパイル使用メモリ 71,644 KB
実行使用メモリ 55,988 KB
最終ジャッジ日時 2023-08-24 19:46:41
合計ジャッジ時間 5,748 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 120 ms
55,604 KB
testcase_01 AC 115 ms
55,544 KB
testcase_02 AC 115 ms
55,724 KB
testcase_03 AC 118 ms
55,612 KB
testcase_04 AC 114 ms
55,924 KB
testcase_05 AC 114 ms
55,340 KB
testcase_06 AC 114 ms
55,920 KB
testcase_07 AC 115 ms
55,360 KB
testcase_08 AC 115 ms
55,816 KB
testcase_09 AC 115 ms
55,988 KB
testcase_10 AC 116 ms
55,344 KB
testcase_11 AC 116 ms
55,808 KB
testcase_12 AC 115 ms
55,756 KB
testcase_13 AC 115 ms
55,956 KB
testcase_14 AC 115 ms
55,528 KB
testcase_15 AC 116 ms
55,636 KB
testcase_16 AC 115 ms
55,660 KB
testcase_17 AC 115 ms
55,332 KB
testcase_18 AC 115 ms
55,656 KB
testcase_19 AC 116 ms
55,376 KB
testcase_20 AC 115 ms
55,596 KB
testcase_21 AC 115 ms
55,956 KB
testcase_22 AC 120 ms
55,976 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    int m = Integer.parseInt(sc.next()) + 1;
    int f = Integer.parseInt(sc.next());
    if(m <= f) {
        System.out.println("YES");
        System.out.println(f - m);
    } else {
        System.out.println("NO");
        System.out.println(m - f);
    }
  }
}
0