結果

問題 No.2441 行列累乗
ユーザー miho-4miho-4
提出日時 2023-08-25 21:28:10
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 71 ms / 2,000 ms
コード長 253 bytes
コンパイル時間 328 ms
コンパイル使用メモリ 87,304 KB
実行使用メモリ 71,408 KB
最終ジャッジ日時 2023-08-25 21:28:16
合計ジャッジ時間 2,681 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 66 ms
71,300 KB
testcase_01 AC 67 ms
71,300 KB
testcase_02 AC 70 ms
71,316 KB
testcase_03 AC 69 ms
71,192 KB
testcase_04 AC 68 ms
71,240 KB
testcase_05 AC 71 ms
71,124 KB
testcase_06 AC 69 ms
71,244 KB
testcase_07 AC 66 ms
70,844 KB
testcase_08 AC 68 ms
70,988 KB
testcase_09 AC 70 ms
71,320 KB
testcase_10 AC 67 ms
70,980 KB
testcase_11 AC 68 ms
70,988 KB
testcase_12 AC 69 ms
71,408 KB
testcase_13 AC 68 ms
71,176 KB
testcase_14 AC 68 ms
70,856 KB
testcase_15 AC 69 ms
71,296 KB
testcase_16 AC 70 ms
71,072 KB
testcase_17 AC 68 ms
71,396 KB
testcase_18 AC 67 ms
71,196 KB
testcase_19 AC 69 ms
71,200 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b=map(int,input().split())
c,d=map(int,input().split())

def f(List_1,List_2):
	a,b,c,d=List_1
	p,q,r,s=List_2
	x1=a*p+b*r
	x2=a*q+b*s
	x3=c*p+d*r
	x4=c*q+d*s
	return [x1,x2,x3,x4]

L=[a,b,c,d]
ans=f(f(L,L),L)
print(ans[0],ans[1])
print(ans[2],ans[3])
0