結果

問題 No.2444 一次変換と体積
ユーザー rlangevinrlangevin
提出日時 2023-08-27 15:41:01
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 396 bytes
コンパイル時間 270 ms
コンパイル使用メモリ 86,988 KB
実行使用メモリ 71,492 KB
最終ジャッジ日時 2023-08-27 15:41:12
合計ジャッジ時間 2,695 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,160 KB
testcase_01 AC 65 ms
71,416 KB
testcase_02 AC 67 ms
71,368 KB
testcase_03 AC 66 ms
71,376 KB
testcase_04 AC 68 ms
71,492 KB
testcase_05 AC 64 ms
71,244 KB
testcase_06 AC 65 ms
71,480 KB
testcase_07 AC 65 ms
71,204 KB
testcase_08 AC 64 ms
71,028 KB
testcase_09 AC 66 ms
71,368 KB
testcase_10 AC 66 ms
71,412 KB
testcase_11 AC 66 ms
71,164 KB
testcase_12 WA -
testcase_13 AC 68 ms
71,104 KB
testcase_14 WA -
testcase_15 AC 66 ms
71,484 KB
testcase_16 AC 65 ms
71,404 KB
testcase_17 WA -
testcase_18 WA -
testcase_19 AC 67 ms
71,140 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N, B = map(int, input().split())
A = []
for i in range(3):
    A.append(list(map(int, input().split())))
    
def det(M):
    v = 0
    v += M[0][0] * M[1][1] * M[2][2]
    v += M[0][1] * M[1][2] * M[2][0]
    v += M[0][2] * M[1][0] * M[2][1]
    v -= M[0][2] * M[1][1] * M[2][0]
    v -= M[0][1] * M[1][0] * M[2][2]
    v -= M[0][0] * M[1][2] * M[2][1]
    return v
    
print(pow(det(A), N, B))
0