結果

問題 No.780 オフ会
ユーザー kohaku_kohakukohaku_kohaku
提出日時 2019-02-19 21:54:09
言語 Java21
(openjdk 21)
結果
AC  
実行時間 124 ms / 2,000 ms
コード長 391 bytes
コンパイル時間 2,238 ms
コンパイル使用メモリ 74,612 KB
実行使用メモリ 41,672 KB
最終ジャッジ日時 2024-04-20 23:08:25
合計ジャッジ時間 5,969 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 106 ms
41,176 KB
testcase_01 AC 105 ms
41,524 KB
testcase_02 AC 118 ms
41,672 KB
testcase_03 AC 117 ms
41,176 KB
testcase_04 AC 124 ms
41,384 KB
testcase_05 AC 119 ms
41,100 KB
testcase_06 AC 104 ms
41,652 KB
testcase_07 AC 109 ms
39,844 KB
testcase_08 AC 106 ms
41,380 KB
testcase_09 AC 110 ms
40,232 KB
testcase_10 AC 109 ms
39,900 KB
testcase_11 AC 101 ms
41,064 KB
testcase_12 AC 105 ms
40,968 KB
testcase_13 AC 120 ms
41,348 KB
testcase_14 AC 115 ms
40,040 KB
testcase_15 AC 109 ms
41,140 KB
testcase_16 AC 105 ms
41,140 KB
testcase_17 AC 109 ms
39,872 KB
testcase_18 AC 102 ms
41,104 KB
testcase_19 AC 109 ms
40,036 KB
testcase_20 AC 104 ms
40,928 KB
testcase_21 AC 100 ms
40,924 KB
testcase_22 AC 121 ms
41,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.*;

public class Main {

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