結果

問題 No.1175 Simultaneous Equations
ユーザー 👑 KazunKazun
提出日時 2020-08-21 21:23:29
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 36 ms / 2,000 ms
コード長 308 bytes
コンパイル時間 265 ms
コンパイル使用メモリ 82,504 KB
実行使用メモリ 53,712 KB
最終ジャッジ日時 2024-04-23 05:20:46
合計ジャッジ時間 1,086 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
52,468 KB
testcase_01 AC 36 ms
53,292 KB
testcase_02 AC 36 ms
52,680 KB
testcase_03 AC 33 ms
52,348 KB
testcase_04 AC 32 ms
52,200 KB
testcase_05 AC 32 ms
52,992 KB
testcase_06 AC 32 ms
52,464 KB
testcase_07 AC 34 ms
52,344 KB
testcase_08 AC 32 ms
52,584 KB
testcase_09 AC 32 ms
53,172 KB
testcase_10 AC 33 ms
52,128 KB
testcase_11 AC 33 ms
52,464 KB
testcase_12 AC 35 ms
53,712 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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

if a*e-b*d!=0:
    x=(b*f-c*e)/(b*d-a*e)
    y=(c*d-a*f)/(b*d-a*e)
else:
    if b!=0:
        x=0
        y=c/b
    elif a!=0:
        x=c/a
        y=0
    elif d!=0:
        x=0
        y=f/e
    elif e!=0:
        x=f/d
        y=0
    else:
        x=y=0
print(x,y)
0