結果

問題 No.780 オフ会
ユーザー neko_the_shadow
提出日時 2019-02-06 19:51:31
言語 Java
(openjdk 23)
結果
AC  
実行時間 133 ms / 2,000 ms
コード長 387 bytes
コンパイル時間 2,610 ms
コンパイル使用メモリ 74,260 KB
実行使用メモリ 54,408 KB
最終ジャッジ日時 2024-06-22 05:47:42
合計ジャッジ時間 5,873 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

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