結果

問題 No.1253 雀見椪
ユーザー ああいい
提出日時 2022-04-05 21:50:13
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 237 bytes
コンパイル時間 546 ms
コンパイル使用メモリ 82,432 KB
実行使用メモリ 77,824 KB
最終ジャッジ日時 2024-11-27 06:14:15
合計ジャッジ時間 4,121 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample WA * 1
other WA * 14
権限があれば一括ダウンロードができます

ソースコード

diff #

T = int(input())
P = 10 ** 9 + 7
def calc(a,b,n):
    inv = pow(b,P-2,P)
    return pow(a * inv % P,n,P)
for _ in range(T):
    n,a,b,c,d,e,f = map(int,input().split())
    ans = calc(a,b,c) + calc(c,d,n) + calc(e,f,n)
    print(ans % P)
0