結果

問題 No.740 幻の木
ユーザー 👑 hos.lyrichos.lyric
提出日時 2020-03-29 16:14:35
言語 Ruby
(3.3.0)
結果
AC  
実行時間 157 ms / 2,000 ms
コード長 133 bytes
コンパイル時間 406 ms
コンパイル使用メモリ 11,128 KB
実行使用メモリ 15,212 KB
最終ジャッジ日時 2023-08-30 19:05:25
合計ジャッジ時間 2,465 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
15,076 KB
testcase_01 AC 81 ms
15,080 KB
testcase_02 AC 79 ms
15,036 KB
testcase_03 AC 79 ms
15,212 KB
testcase_04 AC 79 ms
15,208 KB
testcase_05 AC 80 ms
15,064 KB
testcase_06 AC 157 ms
15,040 KB
testcase_07 AC 79 ms
15,084 KB
testcase_08 AC 82 ms
15,180 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Syntax OK

ソースコード

diff #

n,m,p,q=gets.split.map &:to_i
z=0
while true do
  n-=(p-1<=z%12&&z%12<p-1+q)?2*m:m
  z+=1
  if n<=0 then
    p z
    break
  end
end
0