結果
| 問題 |
No.280 歯車の問題(1)
|
| コンテスト | |
| ユーザー |
akko_yukky
|
| 提出日時 | 2018-05-02 12:50:36 |
| 言語 | Ruby (3.4.1) |
| 結果 |
AC
|
| 実行時間 | 92 ms / 1,000 ms |
| コード長 | 166 bytes |
| コンパイル時間 | 100 ms |
| コンパイル使用メモリ | 7,424 KB |
| 実行使用メモリ | 12,288 KB |
| 最終ジャッジ日時 | 2024-06-28 00:19:34 |
| 合計ジャッジ時間 | 5,625 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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