409335: GYM103486 B Arithmetic Exercise

Memory Limit:256 MB Time Limit:0 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

B. Arithmetic Exercisetime limit per test0.5 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard output

Carol is learning fractional division nowadays. But she has problem determining if the answer is correct. Please you help her find out the correct answer.

Input

A line contains three positive integers $$$A, B$$$ and $$$K$$$: indicating the numerator, the denominator and the number of decimal places to be output.

It's guaranteed that $$$1 \le A \le B \le 10^{3}, 1 \le K \le 10^{3}$$$.

Output

Output one line contains a decimal $$$\frac{A}{B}$$$ with $$$K$$$ digits after the decimal point.

Please round the last decimal with round half up rule. Suppose the $$$K$$$-th digit is $$$x$$$ and the $$$K + 1$$$-th digit is $$$y$$$. If $$$5 \le y \le 9$$$, round the $$$K$$$-th digit to $$$x + 1$$$; otherwise, round it to $$$x$$$

It's guaranteed that $$$x$$$ won't be $$$9$$$ if $$$5 \le y \le 9$$$.

ExamplesInput
1 2 2
Output
0.50
Input
10 99 5
Output
0.10101
Input
656 939 10
Output
0.6986155485
Input
1 3 20
Output
0.33333333333333333333

加入题单

上一题 下一题 算法标签: