結果

問題 No.780 オフ会
ユーザー hnthnt
提出日時 2019-02-04 20:09:30
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 427 bytes
コンパイル時間 3,970 ms
コンパイル使用メモリ 76,052 KB
実行使用メモリ 56,480 KB
最終ジャッジ日時 2023-08-26 21:26:40
合計ジャッジ時間 7,338 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 113 ms
56,380 KB
testcase_01 AC 112 ms
56,016 KB
testcase_02 AC 117 ms
56,200 KB
testcase_03 AC 115 ms
54,104 KB
testcase_04 WA -
testcase_05 WA -
testcase_06 AC 113 ms
55,980 KB
testcase_07 WA -
testcase_08 WA -
testcase_09 AC 110 ms
56,084 KB
testcase_10 AC 107 ms
56,204 KB
testcase_11 WA -
testcase_12 AC 108 ms
55,884 KB
testcase_13 AC 111 ms
56,016 KB
testcase_14 WA -
testcase_15 WA -
testcase_16 AC 109 ms
56,052 KB
testcase_17 AC 112 ms
53,468 KB
testcase_18 WA -
testcase_19 AC 109 ms
55,908 KB
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
権限があれば一括ダウンロードができます

ソースコード

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