結果

問題 No.780 オフ会
ユーザー GrenacheGrenache
提出日時 2019-04-26 15:29:37
言語 Java
(openjdk 23)
結果
AC  
実行時間 129 ms / 2,000 ms
コード長 644 bytes
コンパイル時間 3,565 ms
コンパイル使用メモリ 75,652 KB
実行使用メモリ 41,768 KB
最終ジャッジ日時 2024-11-24 12:51:48
合計ジャッジ時間 7,360 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.io.*;
import java.util.Scanner;


public class Main_yukicoder780 {

	private static Scanner sc;
	private static Printer pr;

	private static void solve() {
		int a = sc.nextInt();
		int b = sc.nextInt();

		if (a + 1 <= b) {
			pr.println("YES");
		} else {
			pr.println("NO");
		}
		pr.println(Math.abs(b - a - 1));
	}

	// ---------------------------------------------------
	public static void main(String[] args) {
		sc = new Scanner(System.in);
		pr = new Printer(System.out);
			
		solve();
			
		pr.close();
		sc.close();
	}

	static class Printer extends PrintWriter {
		Printer(OutputStream out) {
			super(out);
		}
	}
}
0