結果

問題 No.280 歯車の問題(1)
ユーザー H3PO4H3PO4
提出日時 2020-06-10 08:41:13
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 27 ms / 1,000 ms
コード長 170 bytes
コンパイル時間 369 ms
コンパイル使用メモリ 10,556 KB
実行使用メモリ 9,776 KB
最終ジャッジ日時 2023-09-03 20:20:11
合計ジャッジ時間 5,928 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 27 ms
9,572 KB
testcase_01 AC 25 ms
9,692 KB
testcase_02 AC 26 ms
9,700 KB
testcase_03 AC 25 ms
9,624 KB
testcase_04 AC 24 ms
9,764 KB
testcase_05 AC 24 ms
9,620 KB
testcase_06 AC 25 ms
9,644 KB
testcase_07 AC 25 ms
9,760 KB
testcase_08 AC 24 ms
9,624 KB
testcase_09 AC 24 ms
9,776 KB
testcase_10 AC 24 ms
9,620 KB
testcase_11 AC 26 ms
9,696 KB
testcase_12 AC 25 ms
9,620 KB
testcase_13 AC 25 ms
9,544 KB
testcase_14 AC 26 ms
9,760 KB
testcase_15 AC 25 ms
9,620 KB
testcase_16 AC 26 ms
9,708 KB
testcase_17 AC 24 ms
9,624 KB
testcase_18 AC 25 ms
9,620 KB
testcase_19 AC 25 ms
9,620 KB
testcase_20 AC 24 ms
9,584 KB
testcase_21 AC 25 ms
9,620 KB
testcase_22 AC 25 ms
9,548 KB
testcase_23 AC 26 ms
9,580 KB
testcase_24 AC 24 ms
9,444 KB
testcase_25 AC 25 ms
9,648 KB
testcase_26 AC 25 ms
9,756 KB
testcase_27 AC 25 ms
9,768 KB
testcase_28 AC 25 ms
9,576 KB
testcase_29 AC 25 ms
9,772 KB
testcase_30 AC 25 ms
9,700 KB
権限があれば一括ダウンロードができます

ソースコード

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