What are recurring decimal places

This question is a little difficult for me, it is very important to study the ideas contained in it! !


Enter the integers a and b (0 <= a <= 3000.1 <= b <= 3000) and output the cyclic decimal representation of a / b and the length of the cyclic section.

Sample input
76 25
5 43

Sample output
76/25 = 3.04(0)
The length of the loop section is 1

5/43 = 0.(116279069767441860465)
The length of the loop section is 21

Important points:
1For decimal point processing, which I have already done, we need to use elementary school basic methods to deal with it, multiply by 10 to get the rest
2There should be a cyclic decimal place here, meaning the rest is the same (special treatment if broken).
3It is very smart to deal with whether the rest is the same as the previous one. Use an array to deal with this!
4After all, all you have to do is look for the repeated remainder from the start, find the same and know the length of the loop section
5A little math knowledge, for a / b there are only b cases for the remainder (0,1,2 ... b-1) so don't be afraid to do a loop many times

The code is as follows: (๑ • ̀ ㅂ • ́) و✧