結果

問題 No.1748 Parking Lot
ユーザー yudedakoyudedako
提出日時 2022-01-25 00:13:34
言語 Scala(Beta)
(3.4.0)
結果
AC  
実行時間 940 ms / 2,000 ms
コード長 168 bytes
コンパイル時間 11,361 ms
コンパイル使用メモリ 255,440 KB
実行使用メモリ 62,276 KB
最終ジャッジ日時 2023-08-21 15:31:35
合計ジャッジ時間 37,193 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 912 ms
62,016 KB
testcase_01 AC 926 ms
61,760 KB
testcase_02 AC 911 ms
61,924 KB
testcase_03 AC 920 ms
62,116 KB
testcase_04 AC 911 ms
61,960 KB
testcase_05 AC 903 ms
62,200 KB
testcase_06 AC 909 ms
61,980 KB
testcase_07 AC 921 ms
61,884 KB
testcase_08 AC 922 ms
62,008 KB
testcase_09 AC 912 ms
61,844 KB
testcase_10 AC 915 ms
61,784 KB
testcase_11 AC 932 ms
62,056 KB
testcase_12 AC 920 ms
61,796 KB
testcase_13 AC 940 ms
62,044 KB
testcase_14 AC 932 ms
61,968 KB
testcase_15 AC 911 ms
61,972 KB
testcase_16 AC 922 ms
62,212 KB
testcase_17 AC 914 ms
61,920 KB
testcase_18 AC 923 ms
62,276 KB
testcase_19 AC 928 ms
61,908 KB
testcase_20 AC 926 ms
62,080 KB
testcase_21 AC 917 ms
61,684 KB
testcase_22 AC 903 ms
61,536 KB
testcase_23 AC 908 ms
61,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import scala.io.StdIn.*

@main def main =
  val Array(n, k) = readLine().split(' ').map(_.toInt)
  if n == 1 || k + 1 == n then
    println(n)
  else
    println(n - 1)
0