QOJ.ac

QOJ

Limite de temps : 1 s Limite de mémoire : 1024 MB Points totaux : 100 Hackable ✓

#18695. 수학은 비대면강의입니다

Statistiques

スヒョンは第4次産業革命の時代を生きる中学生である。新型コロナウイルス感染症(COVID-19)の影響で、スヒョンはバーチャル学校にバーチャル出席し、バーチャル講義を受けている。スヒョンのバーチャル先生は、2元連立一次方程式の解き方について講義し、次のような問題を宿題として出した。

次の連立方程式における $x$ と $y$ の値を計算せよ。

$$ \begin{cases} ax + by = c \\ dx + ey = f \end{cases} $$

第4次産業革命の時代に宿題などして座っているよりも、バーチャルな友達に会いに行く方が価値があると考えたスヒョンには、このような連立方程式を解く時間がなかった。幸いなことに、バーチャル講義の宿題提出は、インターネット画面の空欄に数値を入力する形式である。各欄には $-999$ 以上 $999$ 以下の整数のみを入力できる。スヒョンがバーチャルな友達に会いにバーチャル世界へ行けるよう手助けしよう。

入力

整数 $a, b, c, d, e, f$ が空白区切りで順に与えられる。($-999 \le a, b, c, d, e, f \le 999$)

問題で言及した方程式を満たす $(x, y)$ が唯一存在し、そのとき $x$ と $y$ がそれぞれ $-999$ 以上 $999$ 以下の整数である場合のみが入力として与えられることが保証されている。

出力

問題の答えである $x$ と $y$ を空白区切りで出力する。

入出力例

入力 1

1 3 -1 4 1 7

出力 1

2 -1

入力 2

2 5 8 3 -4 -11

出力 2

-1 2

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.