結果
| 問題 | No.280 歯車の問題(1) |
| コンテスト | |
| ユーザー |
akko_yukky
|
| 提出日時 | 2018-05-02 12:50:36 |
| 言語 | Ruby (4.0.2) |
| 結果 |
AC
|
| 実行時間 | 50 ms / 1,000 ms |
| + 873µs | |
| コード長 | 166 bytes |
| 記録 | |
| コンパイル時間 | 8 ms |
| コンパイル使用メモリ | 9,088 KB |
| 実行使用メモリ | 14,464 KB |
| 最終ジャッジ日時 | 2026-07-31 12:48:59 |
| 合計ジャッジ時間 | 4,147 ms |
|
ジャッジサーバーID (参考情報) |
judge2_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 31 |
コンパイルメッセージ
Main.rb:1: warning: assigned but unused variable - n Syntax OK
ソースコード
n = gets.to_i
def getoi; gets.split.map(&:to_i); end
input = getoi
ratios = []
input.each_cons(2) {|arr| ratios << Rational(arr[1], arr[0])}
puts ratios.reduce(:*)
akko_yukky