Skip to main content
Tuesday (24.11.2026) at 20:00: ALGOR Contest: Round #4 (Special Challenge) starts!

~/algor $ cat problems/begin-chiziqli-tenglama

Linear equation

Medium 1000 ms 64 MB 37%
Share

Integers $a$ and $b$ are given, $a \ne 0$. Find the root $x$ of the equation:

$$a * x + b = 0, \qquad x = -\frac{b}{a}$$

The point where the line's graph crosses the x axis is the root x of the equation

Input

One line with two integers: $a$ and $b$.

Output

One number — $x$, with exactly 2 digits after the decimal point (for example, 3.00). If the rounded result is zero (for example, $-0.001$), print 0.00 (not -0.00).

Note

$-1000 \le a, b \le 1000$
$a \ne 0$

Examples

Input #1
2 -6
Output #1
3.00
Input #2
3 1
Output #2
-0.33

Sign in to submit a solution

Signing up is free and takes a minute.