結果
| 問題 |
No.280 歯車の問題(1)
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2016-03-19 21:44:07 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
MLE
(最新)
AC
(最初)
|
| 実行時間 | - |
| コード長 | 275 bytes |
| コンパイル時間 | 230 ms |
| コンパイル使用メモリ | 82,440 KB |
| 実行使用メモリ | 88,912 KB |
| 最終ジャッジ日時 | 2024-10-01 09:16:53 |
| 合計ジャッジ時間 | 6,730 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | MLE * 31 |
ソースコード
from fractions import Fraction N = int(input()) Z = [int(s) for s in input().split()] gr = Fraction(1,1) theta = [Fraction(1,1)] for i in range(N-1): theta.append(theta[i]*Fraction(Z[i], Z[i+1])) gr *= theta[i]/theta[i+1]; print(str(gr.numerator)+'/'+str(gr.denominator))