結果

問題 No.2441 行列累乗
ユーザー rlangevinrlangevin
提出日時 2023-08-27 14:45:45
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 326 bytes
コンパイル時間 428 ms
コンパイル使用メモリ 86,824 KB
実行使用メモリ 71,488 KB
最終ジャッジ日時 2023-08-27 14:45:48
合計ジャッジ時間 3,280 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 77 ms
71,292 KB
testcase_01 AC 77 ms
71,428 KB
testcase_02 AC 81 ms
71,244 KB
testcase_03 AC 76 ms
71,372 KB
testcase_04 AC 76 ms
71,256 KB
testcase_05 AC 75 ms
71,268 KB
testcase_06 AC 74 ms
71,404 KB
testcase_07 AC 75 ms
71,304 KB
testcase_08 AC 75 ms
71,284 KB
testcase_09 AC 78 ms
71,412 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

M = []
for i in range(2):
    M.append(list(map(int, input().split())))
    
def prod(A, B):
    C = [[0] * 2 for i in range(2)]
    for i in range(2):
        for j in range(2):
            for k in range(2):
                C[i][j] = A[i][k] * B[k][j]
    return C

M2 = prod(M, M)
M3 = prod(M2, M)
for m in M:
    print(*m)
0