結果

問題 No.3224 2×2行列入門
ユーザー timi
提出日時 2025-08-08 21:28:40
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 40 ms / 2,000 ms
コード長 338 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 82,084 KB
実行使用メモリ 54,088 KB
最終ジャッジ日時 2025-08-08 21:28:45
合計ジャッジ時間 2,204 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #

a,b=map(int, input().split())
c,d=map(int, input().split())
aa,bb=map(int, input().split())
cc,dd=map(int, input().split())

def f(a,b,c,d,aa,bb,cc,dd):
  x,y=a*aa+b*cc,a*bb+b*dd
  xx,yy=c*aa+d*cc,c*bb+d*dd
  return x,y,xx,yy

x,y,w,z=f(a,b,c,d,aa,bb,cc,dd)
x,y,w,z=f(x,y,w,z,a,b,c,d)
x,y,w,z=f(x,y,w,z,aa,bb,cc,dd)
print(x,y)
print(w,z)
0