結果

問題 No.280 歯車の問題(1)
コンテスト
ユーザー yuppe19 😺
提出日時 2015-09-19 10:45:13
言語 PyPy2
(7.3.20)
結果
MLE  
(最新)
AC  
(最初)
実行時間 -
コード長 304 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 260 ms
コンパイル使用メモリ 77,968 KB
最終ジャッジ日時 2025-12-03 17:06:07
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other MLE * 31
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#!/usr/bin/python
from fractions import Fraction
from operator import mul
from itertools import izip, tee

def pairwise(iterable):
    a, b = tee(iterable)
    next(b, None)
    return izip(a, b)

raw_input()
print reduce(mul, map(lambda (x, y): Fraction(y, x), pairwise(map(int, raw_input().split()))))
0