結果

問題 No.280 歯車の問題(1)
ユーザー cormoran
提出日時 2016-06-14 17:33:56
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 37 ms / 1,000 ms
コード長 218 bytes
コンパイル時間 93 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 11,392 KB
最終ジャッジ日時 2024-10-09 13:33:42
合計ジャッジ時間 3,676 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 31
権限があれば一括ダウンロードができます

ソースコード

diff #

import fractions
N = int(input())
Z = list(map(int, input().split()))
G = fractions.Fraction(1, 1);
for i in range(N - 1):
    G *= fractions.Fraction(Z[i + 1], Z[i])
print(str(G.numerator) + '/' + str(G.denominator))
0