結果
| 問題 | No.63 ポッキーゲーム |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2017-09-07 02:09:08 |
| 言語 | Ruby (4.0.2) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 612 bytes |
| 記録 | |
| コンパイル時間 | 40 ms |
| コンパイル使用メモリ | 9,216 KB |
| 実行使用メモリ | 21,120 KB |
| 最終ジャッジ日時 | 2026-05-07 06:26:36 |
| 合計ジャッジ時間 | 9,768 ms |
|
ジャッジサーバーID (参考情報) |
judge2_1 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 TLE * 1 -- * 10 |
コンパイルメッセージ
Syntax OK
ソースコード
class PockyGame
attr_reader :l, :k
def initialize(l: 0, k: 0)
@l, @k = l, k
end
def datainput
begin
@l, @k = gets.chomp.split.map { |v| Integer(v) }
rescue
end
end
def pockygame(pocky_length, once_length)
cnt = 0
loop do
break if pocky_length <= (once_length*2*cnt)
cnt += 1
end
once_length*(cnt-1)
end
def dataoutput
puts pockygame(@l, @k)
end
def run
datainput
dataoutput
end
end
if $0 == __FILE__
PockyGame.new.run
end