結果

問題 No.3224 2×2行列入門
ユーザー moon17
提出日時 2025-08-08 22:29:33
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 346 bytes
コンパイル時間 285 ms
コンパイル使用メモリ 82,320 KB
実行使用メモリ 53,700 KB
最終ジャッジ日時 2025-08-08 22:29:36
合計ジャッジ時間 2,503 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b=map(int,input().split())
c,d=map(int,input().split())
na,nb=map(int,input().split())
nc,nd=map(int,input().split())
def f(x,y):
  ret=[[0]*2 for _ in range(2)]
  for i in range(2):
    for j in range(2):
      ret[i][j]+=x[i][0]*y[0][j]+x[i][1]*y[1][j]
  return ret
c=f(((a,b),(c,d)),((na,nb),(nc,nd)))
ans=f(c,c)
for i,j in ans:
  print(i,j)
0