結果
問題 |
No.751 Frac #2
|
ユーザー |
|
提出日時 | 2020-06-24 20:03:43 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
WA
|
実行時間 | - |
コード長 | 271 bytes |
コンパイル時間 | 335 ms |
コンパイル使用メモリ | 12,544 KB |
実行使用メモリ | 11,008 KB |
最終ジャッジ日時 | 2024-07-02 17:40:28 |
合計ジャッジ時間 | 2,670 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 WA * 1 |
other | AC * 5 WA * 31 |
ソースコード
from math import gcd n1 = int(input()) alst = list(map(int, input().split())) n2 = int(input()) blst = list(map(int, input().split())) u = alst[0] d = blst[0] for num in alst[1:]: d *= num for num in blst[1:]: u *= num tmp = gcd(d, u) print(u // tmp, d // tmp)