結果

問題 No.780 オフ会
ユーザー hnthnt
提出日時 2019-02-04 20:13:50
言語 Java21
(openjdk 21)
結果
AC  
実行時間 121 ms / 2,000 ms
コード長 427 bytes
コンパイル時間 4,775 ms
コンパイル使用メモリ 73,192 KB
実行使用メモリ 56,204 KB
最終ジャッジ日時 2023-08-26 21:27:10
合計ジャッジ時間 6,461 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
55,956 KB
testcase_01 AC 109 ms
55,508 KB
testcase_02 AC 113 ms
55,668 KB
testcase_03 AC 116 ms
55,660 KB
testcase_04 AC 116 ms
55,648 KB
testcase_05 AC 121 ms
56,204 KB
testcase_06 AC 113 ms
55,888 KB
testcase_07 AC 106 ms
56,112 KB
testcase_08 AC 111 ms
55,692 KB
testcase_09 AC 111 ms
55,556 KB
testcase_10 AC 113 ms
55,748 KB
testcase_11 AC 114 ms
55,832 KB
testcase_12 AC 114 ms
55,740 KB
testcase_13 AC 112 ms
56,072 KB
testcase_14 AC 116 ms
56,132 KB
testcase_15 AC 111 ms
55,792 KB
testcase_16 AC 118 ms
55,508 KB
testcase_17 AC 111 ms
55,912 KB
testcase_18 AC 113 ms
55,740 KB
testcase_19 AC 108 ms
56,084 KB
testcase_20 AC 108 ms
55,788 KB
testcase_21 AC 106 ms
55,916 KB
testcase_22 AC 110 ms
55,752 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class no780 {
    public static void main(String[] args) {
       Scanner sc = new Scanner(System.in); 
       final int A = sc.nextInt();
       final int B = sc.nextInt();
       final int YASUO = A + 1;

       if (YASUO <= B) {
           System.out.println("YES");
       } else {
           System.out.println("NO");
       }

       System.out.println("" + Math.abs(YASUO - B));
    }
}
0