結果

問題 No.1253 雀見椪
ユーザー 👑 tatt61880tatt61880
提出日時 2021-02-15 20:12:56
言語 Kuin
(KuinC++ v.2021.9.17)
結果
RE  
実行時間 -
コード長 914 bytes
コンパイル時間 2,691 ms
コンパイル使用メモリ 150,016 KB
実行使用メモリ 4,356 KB
最終ジャッジ日時 2023-10-14 17:09:45
合計ジャッジ時間 6,158 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 6 ms
4,352 KB
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 RE -
testcase_12 RE -
testcase_13 RE -
testcase_14 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var t: int :: cui@inputInt()
	for(1, t)
		var n: int :: cui@inputInt()
		var g: int :: cui@inputInt()
		var G: int :: cui@inputInt()
		var c: int :: cui@inputInt()
		var C: int :: cui@inputInt()
		var p: int :: cui@inputInt()
		var P: int :: cui@inputInt()
		var mod: int :: 1000000007
		
		var ans: int :: 0
		do ans :+ math@modPow(G * C * P, n, mod)
		do ans :% mod
		do ans :+ math@modPow(g * C * P, n, mod) * 2
		do ans :% mod
		do ans :+ math@modPow(G * c * P, n, mod) * 2
		do ans :% mod
		do ans :+ math@modPow(G * C * p, n, mod) * 2
		do ans :% mod
		do ans :+ mod - math@modPow((G - g) * C * P, n, mod)
		do ans :% mod
		do ans :+ mod - math@modPow(G * (C - c) * P, n, mod)
		do ans :% mod
		do ans :+ mod - math@modPow(G * C * (P - p), n, mod)
		do ans :% mod
		do ans :* math@modPow(math@modPow(G * C * P, n, mod), mod - 2, mod)
		do ans :% mod
		do cui@print("\{ans}\n")
	end for
end func
0