No.3356 A÷B Problem
Problem Statement
You are given $2$ integers $A, B$, where $B \neq 0$.
Find the rational number $\frac{A}{B}$ in decimal notation.
It is guaranteed by the constraints that $\frac{A}{B}$ has a finite decimal representation.
Input
The input is given from standard input in $1$ line in the following format:
- Line $1$ contains $A, B$ separated by a single-byte space.
$A$ $B$
Constraints
The input satisfies the following constraints:
- $A$ is an integer satisfying $-10^9 \leq A \leq 10^9$.
- $B$ is an integer satisfying $-10^9 \leq B \leq 10^9$ and $B \neq 0$.
- The rational number $\frac{A}{B}$ has a finite decimal representation.
Output
Output the rational number $\frac{A}{B}$ in decimal notation in $1$ line.
Print a newline at the end.
This problem accepts answers with decimal errors. Your answer is considered correct if its absolute error from the exact answer is at most $10^{-18}$.
Also, due to judge limitations, your output must be fewer than $500$ digits.
Sample 1
Input
1 1
Output
1
$\frac{A}{B} = \frac{1}{1} = 1$. Other outputs such as 1.0, 1.000000000000000001, and 0.999999999999999999 will also be judged AC.
Sample 2
Input
-1 2
Output
-0.5
$\frac{A}{B} = \frac{-1}{2} = -0.5$. Other outputs such as -0.50, -0.500000000000000001, and -0.499999999999999999 will also be judged AC.
Sample 3
Input
0 1
Output
0
$\frac{A}{B} = \frac{0}{1} = 0$. Other outputs such as 0.0, 0.000000000000000001, and -0.000000000000000001 will also be judged AC.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
hamamu