UVA332 LA5440 Rational Numbers from Repeating Fractions【循环小数转分数+GCD】
Arationalnumberisanywhichcanbewrittenintheformp/q,wherepandqareintegers.Allrationalnumberslessthan1(thatis,thoseforwhichpislessthanq)canbeexpandedintoadecimalfraction,butthisexpansionmayrequirerepetit