Problem hidden
DECFRAC - Exact decimal fraction
Given two integers x and y (1<=x,y<=1000) print their quotient as exact decimal fraction. A possible period should be marked by underscores in the above line.
Input
In the first line number N (<=100) of tests, then N lines with the numbers x and y separated by a slash.
Output
The decimal fraction in one or two (in case of a period) lines for each test.
Example
Input: 2
1/2
1/3 Output: 0.5
_
0.3
Thanks are given to numerix for his suggestion.
Added by: | HWK |
Date: | 2011-03-03 |
Time limit: | 1.077s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All |