Practice on Toph

Participate in exhilarating programming contests, solve unique algorithm and data structure challenges and be a part of an awesome community.

Dilu's Library

By jackal_1586 · Limits 1s, 512 MB

Dilu is a young boy who loves mathematics. He recently learned how to code. He was interested in solving different mathematical problems, but was irritated with the fact of double number precision.

He wanted to write a high precision arithmetic library for himself which will have precision up to 100 digits after decimal point. Since Dilu is new in programming, he is facing many problems doing it.

So, he asked for your help. He said only division operation would be okay for now. You'll be given two integers A and B by Dilu. You have to print A/B up to 100 digits after decimal point. If the output exceeds 100 placed after decimal point, you need to round the quotient.

Input

Input begins with a integer T (0 ≤ T ≤ 1000) denoting the number of test cases to be followed. Each of next T line contains two integers A and B (0 ≤ A,B ≤ 10^7 and B ≠ 0).

Output

For each case print the quotient of A/B up to 100. If possible exclude trailing zeros.

Sample

InputOutput
3
2 4
5 5
0 3
0.5
1
0

Discussion

Statistics


25% Solution Ratio

EWU_DeadLocKEarliest, Jun '16

ishtupeedFastest, 0.0s

NJRafiLightest, 131 kB

razwan_islamShortest, 396B

Submit

Login to submit

Toph uses cookies. By continuing you agree to our Cookie Policy.