結果

問題 No.751 Frac #2
ユーザー NoaSaber
提出日時 2021-04-03 18:36:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 291 bytes
コンパイル時間 237 ms
コンパイル使用メモリ 82,548 KB
実行使用メモリ 54,628 KB
最終ジャッジ日時 2024-12-25 11:13:58
合計ジャッジ時間 2,827 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18 WA * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

n_1=int(input())
A=list(map(int,input().split()))
n_2=int(input())
B=list(map(int,input().split()))
up,down=A[0],1
A=A[1:]
import math
for i in A:
    down*=i
for i,j in enumerate(B):
    if i%2==0:
        down*=j
    else:
        up*=j
print(up//math.gcd(up,down),down//math.gcd(up,down))
0