結果
| 問題 | No.751 Frac #2 |
| コンテスト | |
| ユーザー |
Yamada
|
| 提出日時 | 2018-12-28 00:20:00 |
| 言語 | Python3 (3.14.7 + numpy 2.5.2 + scipy 1.18.0 + ACL) |
| 結果 |
RE
不安定
|
| 実行時間 | - |
| コード長 | 324 bytes |
| 記録 | |
| コンパイル時間 | 56 ms |
| コンパイル使用メモリ | 15,104 KB |
| 実行使用メモリ | 13,568 KB |
| 最終ジャッジ日時 | 2026-09-07 14:38:54 |
| 合計ジャッジ時間 | 3,534 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 2 |
| other | RE * 36 |
ソースコード
n1 =int(input())
list1 =list(map(int,input().split()))
n2 =int(input())
list2 =list(map(int,input().split()))
nume =list1[0]
deno =list2[0]
for i in range(n1-1):
deno *= list1[i+1]
for i in range(n2-1):
nume *= list2[i+1]
gcd = euclid(nume,deno)
if deno < 0:
nume *= -1
deno *= -1
print(nume//gcd,deno//gcd)
Yamada