結果
| 問題 |
No.280 歯車の問題(1)
|
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2024-02-04 21:05:33 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 240 bytes |
| コンパイル時間 | 147 ms |
| コンパイル使用メモリ | 82,208 KB |
| 実行使用メモリ | 88,704 KB |
| 最終ジャッジ日時 | 2024-09-28 11:20:46 |
| 合計ジャッジ時間 | 8,276 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | MLE * 31 |
ソースコード
from fractions import Fraction
N = int(input())
Z = list(map(int,input().split()))
z0 = Z[0]
ratio = 1
for i in range(1,N):
ratio = Fraction(ratio*Z[i],Z[i-1])
if ratio == int(ratio):
print(str(ratio) + "/1")
else:
print(ratio)
ntuda