結果

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

ソースコード

diff #

from fractions import Fraction

N = int(input())
Z = tuple(map(int, input().split()))
ans = Fraction(Z[-1], Z[0])
print(ans if ans.denominator != 1 else f'{int(ans)}/1')
0