結果

問題 No.1748 Parking Lot
ユーザー ks2mks2m
提出日時 2021-11-19 21:52:55
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 304 bytes
コンパイル時間 1,943 ms
コンパイル使用メモリ 74,136 KB
実行使用メモリ 41,472 KB
最終ジャッジ日時 2024-06-10 08:41:44
合計ジャッジ時間 5,229 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 111 ms
41,152 KB
testcase_01 AC 103 ms
41,156 KB
testcase_02 AC 93 ms
39,776 KB
testcase_03 AC 106 ms
41,276 KB
testcase_04 AC 96 ms
39,888 KB
testcase_05 AC 106 ms
41,456 KB
testcase_06 AC 97 ms
40,344 KB
testcase_07 AC 98 ms
40,264 KB
testcase_08 AC 103 ms
41,472 KB
testcase_09 AC 92 ms
39,856 KB
testcase_10 AC 99 ms
40,052 KB
testcase_11 AC 101 ms
40,824 KB
testcase_12 AC 105 ms
41,076 KB
testcase_13 AC 105 ms
40,764 KB
testcase_14 AC 106 ms
41,152 KB
testcase_15 AC 107 ms
41,004 KB
testcase_16 AC 101 ms
39,880 KB
testcase_17 AC 106 ms
41,040 KB
testcase_18 AC 99 ms
39,872 KB
testcase_19 AC 94 ms
39,772 KB
testcase_20 AC 102 ms
40,544 KB
testcase_21 AC 106 ms
41,196 KB
testcase_22 AC 92 ms
39,724 KB
testcase_23 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import java.util.Scanner;

public class Main {
	public static void main(String[] args) throws Exception {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int k = sc.nextInt();
		sc.close();

		if (k == n - 1) {
			System.out.println(n);
		} else {
			System.out.println(n - 1);
		}
	}
}
0