結果

問題 No.780 オフ会
ユーザー NewbiekunNewbiekun
提出日時 2019-01-26 17:35:53
言語 Java19
(openjdk 21)
結果
AC  
実行時間 125 ms / 2,000 ms
コード長 401 bytes
コンパイル時間 3,364 ms
コンパイル使用メモリ 71,836 KB
実行使用メモリ 56,304 KB
最終ジャッジ日時 2023-10-14 14:15:48
合計ジャッジ時間 7,964 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
56,304 KB
testcase_01 AC 122 ms
55,768 KB
testcase_02 AC 122 ms
55,988 KB
testcase_03 AC 124 ms
56,168 KB
testcase_04 AC 120 ms
55,636 KB
testcase_05 AC 125 ms
55,864 KB
testcase_06 AC 125 ms
55,820 KB
testcase_07 AC 120 ms
55,740 KB
testcase_08 AC 119 ms
55,904 KB
testcase_09 AC 120 ms
55,776 KB
testcase_10 AC 118 ms
55,940 KB
testcase_11 AC 120 ms
55,948 KB
testcase_12 AC 119 ms
56,036 KB
testcase_13 AC 121 ms
56,056 KB
testcase_14 AC 119 ms
55,776 KB
testcase_15 AC 119 ms
56,008 KB
testcase_16 AC 119 ms
56,080 KB
testcase_17 AC 119 ms
55,944 KB
testcase_18 AC 121 ms
55,952 KB
testcase_19 AC 121 ms
56,124 KB
testcase_20 AC 120 ms
55,752 KB
testcase_21 AC 121 ms
55,960 KB
testcase_22 AC 121 ms
55,632 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;
public class yukicoderNo780 {
    
	public static void main(String[] args)
	{
		Scanner sc = new Scanner(System.in);
		int dansi = sc.nextInt();
		int josi = sc.nextInt();

		if( dansi + 1 <= josi )
		{
			System.out.println( "YES" );
			System.out.println( josi - dansi - 1 );
		}
		else
		{
			System.out.println( "NO" );
			System.out.println( dansi + 1 - josi );
		}
	}
}
0