結果

問題 No.995 タピオカオイシクナーレ
ユーザー chinchilla
提出日時 2020-02-21 22:33:06
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
WA  
実行時間 -
コード長 237 bytes
コンパイル時間 213 ms
コンパイル使用メモリ 12,672 KB
実行使用メモリ 10,880 KB
最終ジャッジ日時 2024-10-08 22:52:45
合計ジャッジ時間 2,216 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 10 WA * 13
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys, itertools
md = 1000000007
h = (md+1)//2
n, m, k, p, q = map(int, input().split())
bi = sum(map(int, itertools.islice(sys.stdin, m)))
bo = sum(map(int, sys.stdin))
print(((bi+bo)+(bi-bo)*pow(2*p*pow(q, -1, md)-1, k, md))*h%md)
0