結果

問題 No.780 オフ会
ユーザー GrenacheGrenache
提出日時 2019-04-26 15:29:37
言語 Java19
(openjdk 21)
結果
AC  
実行時間 126 ms / 2,000 ms
コード長 644 bytes
コンパイル時間 4,404 ms
コンパイル使用メモリ 72,628 KB
実行使用メモリ 56,600 KB
最終ジャッジ日時 2023-08-16 03:17:30
合計ジャッジ時間 8,046 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 123 ms
56,032 KB
testcase_01 AC 123 ms
54,352 KB
testcase_02 AC 123 ms
56,456 KB
testcase_03 AC 126 ms
55,924 KB
testcase_04 AC 122 ms
55,860 KB
testcase_05 AC 125 ms
56,228 KB
testcase_06 AC 123 ms
55,788 KB
testcase_07 AC 124 ms
55,728 KB
testcase_08 AC 123 ms
55,884 KB
testcase_09 AC 124 ms
56,260 KB
testcase_10 AC 125 ms
56,276 KB
testcase_11 AC 126 ms
55,744 KB
testcase_12 AC 124 ms
55,920 KB
testcase_13 AC 123 ms
55,944 KB
testcase_14 AC 121 ms
55,772 KB
testcase_15 AC 122 ms
56,320 KB
testcase_16 AC 121 ms
56,260 KB
testcase_17 AC 122 ms
55,996 KB
testcase_18 AC 124 ms
55,956 KB
testcase_19 AC 124 ms
55,968 KB
testcase_20 AC 123 ms
56,156 KB
testcase_21 AC 122 ms
54,140 KB
testcase_22 AC 123 ms
56,600 KB
権限があれば一括ダウンロードができます

ソースコード

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