結果

問題 No.1175 Simultaneous Equations
ユーザー 双六双六
提出日時 2020-08-21 21:25:58
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 452 ms / 2,000 ms
コード長 444 bytes
コンパイル時間 83 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 44,448 KB
最終ジャッジ日時 2024-04-23 05:24:34
合計ジャッジ時間 7,054 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 447 ms
44,192 KB
testcase_01 AC 442 ms
44,192 KB
testcase_02 AC 445 ms
43,940 KB
testcase_03 AC 452 ms
43,936 KB
testcase_04 AC 448 ms
43,936 KB
testcase_05 AC 446 ms
44,328 KB
testcase_06 AC 438 ms
43,936 KB
testcase_07 AC 437 ms
43,944 KB
testcase_08 AC 448 ms
43,940 KB
testcase_09 AC 448 ms
44,448 KB
testcase_10 AC 445 ms
44,072 KB
testcase_11 AC 449 ms
44,352 KB
testcase_12 AC 448 ms
44,196 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