結果
| 問題 | No.751 Frac #2 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2018-11-11 11:04:51 |
| 言語 | PyPy2 (7.3.20) |
| 結果 |
AC
不安定
|
| 実行時間 | 130 ms / 1,000 ms |
| + 556µs | |
| コード長 | 294 bytes |
| 記録 | |
| コンパイル時間 | 1,819 ms |
| コンパイル使用メモリ | 62,176 KB |
| 実行使用メモリ | 81,552 KB |
| 最終ジャッジ日時 | 2026-10-13 19:51:27 |
| 合計ジャッジ時間 | 9,180 ms |
|
ジャッジサーバーID (参考情報) |
judge3_0 / judge1_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 2 |
| other | AC * 37 |
ソースコード
#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