結果
| 問題 | No.280 歯車の問題(1) |
| コンテスト | |
| ユーザー |
ntuda
|
| 提出日時 | 2024-02-04 21:05:33 |
| 言語 | PyPy3 (7.3.17) |
| 結果 |
MLE
|
| 実行時間 | - |
| コード長 | 240 bytes |
| 記録 | |
| コンパイル時間 | 142 ms |
| コンパイル使用メモリ | 85,688 KB |
| 実行使用メモリ | 85,884 KB |
| 最終ジャッジ日時 | 2026-04-15 02:47:34 |
| 合計ジャッジ時間 | 6,176 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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