結果

問題 No.1175 Simultaneous Equations
ユーザー 双六双六
提出日時 2020-08-21 21:25:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 138 ms / 2,000 ms
コード長 444 bytes
コンパイル時間 116 ms
コンパイル使用メモリ 10,568 KB
実行使用メモリ 29,728 KB
最終ジャッジ日時 2023-08-05 07:28:49
合計ジャッジ時間 3,036 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 129 ms
29,576 KB
testcase_01 AC 133 ms
29,728 KB
testcase_02 AC 131 ms
29,564 KB
testcase_03 AC 128 ms
29,712 KB
testcase_04 AC 134 ms
29,604 KB
testcase_05 AC 138 ms
29,620 KB
testcase_06 AC 138 ms
29,608 KB
testcase_07 AC 136 ms
29,640 KB
testcase_08 AC 137 ms
29,656 KB
testcase_09 AC 136 ms
29,684 KB
testcase_10 AC 135 ms
29,696 KB
testcase_11 AC 135 ms
29,688 KB
testcase_12 AC 132 ms
29,664 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

def getlist():
	return list(map(int, input().split()))

import numpy as np

#処理内容
def main():
	a, b, c, d, e, f = getlist()
	val = a * e - b * d
	ans = np.array([[e, -b], [-d, a]]) @ np.array([[c], [f]])
	ans = ans / val
	print(ans[0][0], ans[1][0])
	
if __name__ == '__main__':
	main()
0