結果

問題 No.2441 行列累乗
ユーザー hibit_athibit_at
提出日時 2023-08-25 21:23:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 159 ms
コンパイル使用メモリ 10,716 KB
実行使用メモリ 29,600 KB
最終ジャッジ日時 2023-08-25 21:23:16
合計ジャッジ時間 5,426 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 128 ms
29,580 KB
testcase_01 AC 127 ms
29,372 KB
testcase_02 AC 126 ms
29,516 KB
testcase_03 AC 135 ms
29,420 KB
testcase_04 AC 130 ms
29,484 KB
testcase_05 AC 127 ms
29,600 KB
testcase_06 AC 129 ms
29,504 KB
testcase_07 AC 130 ms
29,472 KB
testcase_08 AC 128 ms
29,492 KB
testcase_09 AC 129 ms
29,532 KB
testcase_10 AC 126 ms
29,508 KB
testcase_11 AC 129 ms
29,460 KB
testcase_12 AC 128 ms
29,500 KB
testcase_13 AC 133 ms
29,468 KB
testcase_14 AC 129 ms
29,536 KB
testcase_15 AC 128 ms
29,516 KB
testcase_16 AC 132 ms
29,464 KB
testcase_17 AC 131 ms
29,528 KB
testcase_18 AC 128 ms
29,404 KB
testcase_19 AC 129 ms
29,472 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np

c = list(map(int, input().split(' ')))
d = list(map(int, input().split(' ')))

a = np.array([c,d])
ans = np.matmul(a,np.matmul(a,a))
print(*ans[0])
print(*ans[1])
0