結果

問題 No.3224 2×2行列入門
コンテスト
ユーザー OrAnGe summer
提出日時 2026-02-23 23:45:26
言語 Python3
(3.14.3 + numpy 2.4.2 + scipy 1.17.0)
コンパイル:
python3 -mpy_compile _filename_
実行:
python3 _filename_
結果
AC  
実行時間 164 ms / 2,000 ms
コード長 386 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 639 ms
コンパイル使用メモリ 20,824 KB
実行使用メモリ 15,488 KB
最終ジャッジ日時 2026-02-23 23:45:33
合計ジャッジ時間 6,086 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 23
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

def calc(a, b, c, d, e, f, g, h):
    x = a * e + b * g
    y = a * f + b * h
    z = c * e + d * g
    w = c * f + d * h

    return x, y, z, w

a, b = map(int, input().split())
c, d = map(int, input().split())
e, f = map(int, input().split())
g, h = map(int, input().split())

x, y, z, w = calc(a, b, c, d, e, f, g, h)
x, y, z, w = calc(x, y, z, w, x, y, z, w)
print(x, y)
print(z, w)
0