結果
| 問題 | No.1253 雀見椪 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2021-02-15 20:17:06 | 
| 言語 | Kuin (KuinC++ v.2021.9.17) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 1,407 ms / 2,000 ms | 
| コード長 | 1,010 bytes | 
| コンパイル時間 | 2,211 ms | 
| コンパイル使用メモリ | 147,400 KB | 
| 実行使用メモリ | 6,948 KB | 
| 最終ジャッジ日時 | 2024-09-16 11:25:43 | 
| 合計ジャッジ時間 | 17,077 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge6 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 14 | 
ソースコード
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 % mod * P % mod, n, mod)
		do ans :% mod
		do ans :+ math@modPow(g * C % mod * P % mod, n, mod) * 2
		do ans :% mod
		do ans :+ math@modPow(G * c % mod * P % mod, n, mod) * 2
		do ans :% mod
		do ans :+ math@modPow(G * C % mod * p % mod, n, mod) * 2
		do ans :% mod
		do ans :+ mod - math@modPow((G - g) * C % mod * P % mod, n, mod)
		do ans :% mod
		do ans :+ mod - math@modPow(G * (C - c) % mod * P % mod, n, mod)
		do ans :% mod
		do ans :+ mod - math@modPow(G * C % mod * (P - p) % mod, n, mod)
		do ans :% mod
		do ans :* math@modPow(math@modPow(G * C % mod * P % mod, n, mod), mod - 2, mod)
		do ans :% mod
		do cui@print("\{ans}\n")
	end for
end func
            
            
            
        