結果

問題 No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
ユーザー kou_kkkkou_kkk
提出日時 2023-09-07 10:05:00
言語 Nim
(2.0.2)
結果
RE  
実行時間 -
コード長 191 bytes
コンパイル時間 3,907 ms
コンパイル使用メモリ 67,200 KB
実行使用メモリ 4,500 KB
最終ジャッジ日時 2023-09-07 10:05:09
合計ジャッジ時間 4,886 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 2 ms
4,380 KB
testcase_03 AC 1 ms
4,380 KB
testcase_04 AC 2 ms
4,380 KB
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
testcase_15 RE -
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 2 ms
4,380 KB
testcase_19 AC 2 ms
4,380 KB
testcase_20 AC 2 ms
4,376 KB
testcase_21 AC 1 ms
4,380 KB
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 AC 1 ms
4,376 KB
testcase_27 AC 2 ms
4,376 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sequtils, strscans
let (_, n, k) = stdin.readAll.scanTuple"$i $i"
echo:
  if k notin {1 .. n}: 0
  else:
    var a = true.repeat n
    a[k-1] = false
    a[^k] = false
    a.count true
0