結果
| 問題 | No.521 Cheeses and a Mousetrap(チーズとネズミ捕り) |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-11-14 21:26:28 |
| 言語 | Ruby (4.0.2) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 181 bytes |
| 記録 | |
| コンパイル時間 | 110 ms |
| コンパイル使用メモリ | 9,216 KB |
| 実行使用メモリ | 533,760 KB |
| 最終ジャッジ日時 | 2026-05-19 09:27:40 |
| 合計ジャッジ時間 | 4,462 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 MLE * 1 -- * 22 |
コンパイルメッセージ
Syntax OK
ソースコード
box, th = gets.chomp.split(' ').map(&:to_i)
list = Array.new
box.times{ list << 1 }
list[th - 1], list[-th] = 0, 0
list[0..list.length] = 0 if th == 0 || th > box
puts list.count(1)