循环小数 Repeating Decimals

题意翻译

输入整数$a$ 和$b$ (0≤$a$ ≤3000,1≤$b$ ≤3000),输出a/b的循环小数表示以及循环节的长度。例如$a$ =5,$b$ =43 小数表示为0.(116279069767441860465),循环节长度为21。 补充: 如果循环节超过50位,就在第50位后打省略号(三个点,就像“…”) 感谢@很dalao的蒟蒻 提供的翻译

题目描述

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=4&page=show_problem&problem=138 [PDF](https://uva.onlinejudge.org/external/2/p202.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA202/10131a581089b5c0585c91535cc5b871220b96d8.png)

输入输出格式

输入格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA202/4cf21b4b1aff733171bac37e191b3be541d88bd3.png)

输出格式


![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA202/9a410019a8818471346896f20994d1ffc4910f4c.png)

输入输出样例

输入样例 #1

76 25
5 43
1 397

输出样例 #1

76/25 = 3.04(0)
   1 = number of digits in repeating cycle

5/43 = 0.(116279069767441860465)
   21 = number of digits in repeating cycle

1/397 = 0.(00251889168765743073047858942065491183879093198992...)
   99 = number of digits in repeating cycle