結果

問題 No.780 オフ会
ユーザー トミートミー
提出日時 2024-04-01 19:20:06
言語 Java21
(openjdk 21)
結果
AC  
実行時間 155 ms / 2,000 ms
コード長 395 bytes
コンパイル時間 2,330 ms
コンパイル使用メモリ 80,316 KB
実行使用メモリ 57,944 KB
最終ジャッジ日時 2024-04-01 19:20:13
合計ジャッジ時間 6,857 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 126 ms
57,824 KB
testcase_01 AC 125 ms
57,708 KB
testcase_02 AC 127 ms
57,692 KB
testcase_03 AC 132 ms
57,848 KB
testcase_04 AC 132 ms
57,704 KB
testcase_05 AC 155 ms
57,828 KB
testcase_06 AC 129 ms
57,828 KB
testcase_07 AC 129 ms
57,828 KB
testcase_08 AC 124 ms
57,844 KB
testcase_09 AC 124 ms
57,688 KB
testcase_10 AC 135 ms
57,572 KB
testcase_11 AC 126 ms
57,944 KB
testcase_12 AC 128 ms
57,812 KB
testcase_13 AC 134 ms
57,820 KB
testcase_14 AC 127 ms
57,588 KB
testcase_15 AC 125 ms
57,816 KB
testcase_16 AC 132 ms
57,824 KB
testcase_17 AC 129 ms
57,824 KB
testcase_18 AC 122 ms
57,708 KB
testcase_19 AC 126 ms
57,828 KB
testcase_20 AC 125 ms
57,824 KB
testcase_21 AC 131 ms
57,576 KB
testcase_22 AC 124 ms
57,584 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        int b = sc.nextInt();
        if (a < b) {
            System.out.println("YES");
        } else {
            System.out.println("NO");
        }
        System.out.println(Math.abs(a - b + 1));

        sc.close();

    }
}
0