結果
問題 | No.63 ポッキーゲーム |
ユーザー |
|
提出日時 | 2017-09-07 02:18:05 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 100 ms / 5,000 ms |
コード長 | 593 bytes |
コンパイル時間 | 47 ms |
コンパイル使用メモリ | 7,424 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-12-24 05:40:09 |
合計ジャッジ時間 | 3,075 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
コンパイルメッセージ
Syntax OK
ソースコード
class PockyGameattr_reader :l, :kdef initialize(l: 0, k: 0)@l, @k = l, kenddef datainputbegin@l, @k = gets.chomp.split.map { |v| Integer(v) }rescueendenddef pockygame(pocky_length, once_length)cnt = pocky_length / (once_length * 2)cnt -= 1 if pocky_length % (once_length * 2) == 0once_length * cntenddef dataoutputputs pockygame(@l, @k)enddef rundatainputdataoutputendendif $0 == __FILE__PockyGame.new.runend