結果
問題 |
No.3224 2×2行列入門
|
ユーザー |
|
提出日時 | 2025-08-15 17:57:43 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 40 ms / 2,000 ms |
コード長 | 514 bytes |
コンパイル時間 | 398 ms |
コンパイル使用メモリ | 82,608 KB |
実行使用メモリ | 53,860 KB |
最終ジャッジ日時 | 2025-08-15 17:57:46 |
合計ジャッジ時間 | 2,929 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 23 |
ソースコード
M1=[] M1.extend(list(map(int,input().split()))) M1.extend(list(map(int,input().split()))) M2=[] M2.extend(list(map(int,input().split()))) M2.extend(list(map(int,input().split()))) tmp=[0,0,0,0] tmp[0]=M1[0]*M2[0]+M1[1]*M2[2] tmp[1]=M1[0]*M2[1]+M1[1]*M2[3] tmp[2]=M1[2]*M2[0]+M1[3]*M2[2] tmp[3]=M1[2]*M2[1]+M1[3]*M2[3] ans=[0,0,0,0] ans[0]=tmp[0]*tmp[0]+tmp[1]*tmp[2] ans[1]=tmp[0]*tmp[1]+tmp[1]*tmp[3] ans[2]=tmp[2]*tmp[0]+tmp[3]*tmp[2] ans[3]=tmp[2]*tmp[1]+tmp[3]*tmp[3] print(ans[0],ans[1]) print(ans[2],ans[3])