9055 - Repeating Decimals   

Description

Given two positive integers a and b. Please output the result of a / b. If it exists the repeating cycle, please output the minimum length of it. If it doesn’t exist, please output “(0)” after the result. For example, the answer of “1/3” is “0.(3)” and the answer of “1/4” is “0.25(0)”.

Input

The input includes multiple test cases. In each test case, the one line contains two integers, a and b.

1<= a,b <= 3000

 

If the length of the repeating cyle is more than 50, only output the first 50 digits. Then output "..." after.

Sample Input  Download

Sample Output  Download

Tags




Discuss