結果
| 問題 | No.63 ポッキーゲーム |
| コンテスト | |
| ユーザー |
sjgq5302
|
| 提出日時 | 2017-07-22 08:47:45 |
| 言語 | Ruby (4.0.7 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 50 ms / 5,000 ms |
| + 286µs | |
| コード長 | 301 bytes |
| 記録 | |
| コンパイル時間 | 10 ms |
| コンパイル使用メモリ | 8,832 KB |
| 実行使用メモリ | 14,592 KB |
| 最終ジャッジ日時 | 2026-10-07 02:22:51 |
| 合計ジャッジ時間 | 2,461 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 22 |
コンパイルメッセージ
Main.rb:9: warning: `elsif` at the end of line without an expression Syntax OK
ソースコード
input = gets.split(" ").map(&:to_i)
length = input[0] #ポッキーの長さ
bite = input[1] #1回にかじる長さ
bite_times = length / (bite * 2) #かじる回数
if (length % (bite * 2)) == 0
bite_by_yu = (bite_times - 1) * bite
elsif
bite_by_yu = bite_times * bite
end
puts bite_by_yu
sjgq5302