結果

問題 No.521 Cheeses and a Mousetrap(チーズとネズミ捕り)
ユーザー rkyrky
提出日時 2017-11-14 21:26:28
言語 Ruby
(3.4.1)
結果
TLE  
実行時間 -
コード長 181 bytes
コンパイル時間 47 ms
コンパイル使用メモリ 7,680 KB
実行使用メモリ 824,608 KB
最終ジャッジ日時 2024-11-25 02:15:15
合計ジャッジ時間 41,895 ms
ジャッジサーバーID
(参考情報)
judge2 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 15 TLE * 12 MLE * 1
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

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)
0