結果

問題 No.751 Frac #2
ユーザー pluto77pluto77
提出日時 2018-11-11 11:04:51
言語 Python2
(2.7.18)
結果
AC  
実行時間 21 ms / 1,000 ms
コード長 294 bytes
コンパイル時間 613 ms
コンパイル使用メモリ 7,112 KB
実行使用メモリ 7,816 KB
最終ジャッジ日時 2023-08-19 10:25:32
合計ジャッジ時間 3,199 ms
ジャッジサーバーID
(参考情報)
judge10 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 19 ms
7,724 KB
testcase_01 AC 20 ms
7,760 KB
testcase_02 AC 20 ms
7,764 KB
testcase_03 AC 19 ms
7,808 KB
testcase_04 AC 20 ms
7,764 KB
testcase_05 AC 19 ms
7,608 KB
testcase_06 AC 19 ms
7,600 KB
testcase_07 AC 19 ms
7,596 KB
testcase_08 AC 19 ms
7,724 KB
testcase_09 AC 18 ms
7,640 KB
testcase_10 AC 19 ms
7,764 KB
testcase_11 AC 19 ms
7,636 KB
testcase_12 AC 20 ms
7,688 KB
testcase_13 AC 19 ms
7,724 KB
testcase_14 AC 19 ms
7,664 KB
testcase_15 AC 19 ms
7,776 KB
testcase_16 AC 19 ms
7,816 KB
testcase_17 AC 20 ms
7,616 KB
testcase_18 AC 19 ms
7,596 KB
testcase_19 AC 18 ms
7,768 KB
testcase_20 AC 19 ms
7,616 KB
testcase_21 AC 19 ms
7,724 KB
testcase_22 AC 19 ms
7,804 KB
testcase_23 AC 19 ms
7,600 KB
testcase_24 AC 18 ms
7,792 KB
testcase_25 AC 19 ms
7,780 KB
testcase_26 AC 20 ms
7,640 KB
testcase_27 AC 21 ms
7,664 KB
testcase_28 AC 20 ms
7,688 KB
testcase_29 AC 20 ms
7,612 KB
testcase_30 AC 20 ms
7,608 KB
testcase_31 AC 18 ms
7,620 KB
testcase_32 AC 19 ms
7,616 KB
testcase_33 AC 20 ms
7,724 KB
testcase_34 AC 20 ms
7,716 KB
testcase_35 AC 19 ms
7,612 KB
testcase_36 AC 19 ms
7,592 KB
testcase_37 AC 19 ms
7,724 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki751

from operator import mul
from fractions import Fraction as f

n1=int(raw_input())
a=map(int,raw_input().split())
n2=int(raw_input())
b=map(int,raw_input().split())
nu=[a[0]]+b[1::2]
de=a[1:]+b[0::2]
nu=reduce(mul,nu)
de=reduce(mul,de)
res=f(nu,de)
print res.numerator,res.denominator
0