結果

問題 No.1175 Simultaneous Equations
ユーザー ThetaTheta
提出日時 2022-10-18 13:28:44
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 245 bytes
コンパイル時間 703 ms
コンパイル使用メモリ 10,464 KB
実行使用メモリ 31,552 KB
最終ジャッジ日時 2023-09-11 07:38:20
合計ジャッジ時間 4,318 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 132 ms
31,552 KB
testcase_01 AC 133 ms
29,860 KB
testcase_02 AC 131 ms
30,056 KB
testcase_03 AC 134 ms
29,716 KB
testcase_04 AC 130 ms
29,900 KB
testcase_05 AC 131 ms
31,408 KB
testcase_06 AC 130 ms
29,804 KB
testcase_07 AC 135 ms
31,472 KB
testcase_08 AC 131 ms
29,892 KB
testcase_09 AC 133 ms
30,000 KB
testcase_10 AC 133 ms
29,972 KB
testcase_11 AC 131 ms
29,856 KB
testcase_12 AC 134 ms
29,748 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import numpy as np


def main():
    a, b, c, d, e, f = map(int, input().split())

    A = np.matrix([(a, b), (d, e)])
    b_ = np.array([[c], [f]])

    x = np.dot(A**-1, b_)

    print(x[0, 0], x[1, 0])


if __name__ == "__main__":
    main()
0