結果
問題 | No.63 ポッキーゲーム |
ユーザー |
![]() |
提出日時 | 2016-08-01 10:28:01 |
言語 | Ruby (3.4.1) |
結果 |
AC
|
実行時間 | 99 ms / 5,000 ms |
コード長 | 212 bytes |
コンパイル時間 | 344 ms |
コンパイル使用メモリ | 7,296 KB |
実行使用メモリ | 12,288 KB |
最終ジャッジ日時 | 2024-12-24 05:14:19 |
合計ジャッジ時間 | 3,427 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 22 |
コンパイルメッセージ
Syntax OK
ソースコード
inputs = STDIN.readlines.map(&:chomp) l, k = inputs[0].split(/\s+/).map(&:to_i) def yuu_length(l, k) if l % (2 * k) == 0 (l / (2 * k) - 1) * k else (l / (2 * k)) * k end end puts yuu_length(l, k)