結果
| 問題 | No.751 Frac #2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-11-11 11:04:51 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
|
| 実行時間 | 99 ms / 1,000 ms |
| + 589µs | |
| コード長 | 294 bytes |
| 記録 | |
| コンパイル時間 | 66 ms |
| コンパイル使用メモリ | 81,024 KB |
| 実行使用メモリ | 95,232 KB |
| 最終ジャッジ日時 | 2026-07-18 18:37:45 |
| 合計ジャッジ時間 | 5,806 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge2_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 36 |
ソースコード
#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