結果

問題 No.1748 Parking Lot
ユーザー ks2mks2m
提出日時 2021-11-19 21:52:55
言語 Java21
(openjdk 21)
結果
WA  
実行時間 -
コード長 304 bytes
コンパイル時間 2,078 ms
コンパイル使用メモリ 71,372 KB
実行使用メモリ 58,256 KB
最終ジャッジ日時 2023-08-30 08:13:48
合計ジャッジ時間 6,888 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 121 ms
55,584 KB
testcase_01 AC 122 ms
55,868 KB
testcase_02 AC 124 ms
55,404 KB
testcase_03 AC 124 ms
56,152 KB
testcase_04 AC 124 ms
55,496 KB
testcase_05 AC 123 ms
55,640 KB
testcase_06 AC 125 ms
56,212 KB
testcase_07 AC 123 ms
55,616 KB
testcase_08 AC 125 ms
55,760 KB
testcase_09 AC 125 ms
55,520 KB
testcase_10 AC 125 ms
55,804 KB
testcase_11 AC 124 ms
55,720 KB
testcase_12 AC 123 ms
55,468 KB
testcase_13 AC 122 ms
55,708 KB
testcase_14 AC 121 ms
55,776 KB
testcase_15 AC 123 ms
55,900 KB
testcase_16 AC 122 ms
55,620 KB
testcase_17 AC 124 ms
55,964 KB
testcase_18 AC 125 ms
55,596 KB
testcase_19 AC 124 ms
55,464 KB
testcase_20 AC 124 ms
55,568 KB
testcase_21 AC 127 ms
55,936 KB
testcase_22 AC 122 ms
55,428 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