結果

問題 No.780 オフ会
ユーザー iwa_choco_168iwa_choco_168
提出日時 2019-12-06 09:42:43
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 387 bytes
コンパイル時間 2,686 ms
コンパイル使用メモリ 71,488 KB
実行使用メモリ 57,604 KB
最終ジャッジ日時 2023-08-24 19:46:35
合計ジャッジ時間 6,012 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 118 ms
55,724 KB
testcase_01 AC 122 ms
55,684 KB
testcase_02 AC 118 ms
55,844 KB
testcase_03 AC 117 ms
55,420 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 117 ms
55,528 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 117 ms
56,112 KB
testcase_10 AC 117 ms
55,628 KB
testcase_11 WA -
testcase_12 AC 116 ms
56,028 KB
testcase_13 AC 115 ms
55,200 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 116 ms
55,856 KB
testcase_17 AC 116 ms
55,616 KB
testcase_18 WA -
testcase_19 AC 123 ms
55,800 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

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(0);
    } else {
        System.out.println("NO");
        System.out.println(m - f);
    }
  }
}
0