Problem

Source: 2022 South Russian Girls MO - Assara Seniors p4

Tags: number theory, algebra, periodic decimal number



Alina knows how to twist a periodic decimal fraction in the following way: she finds the minimum preperiod of the fraction, then takes the number that makes up the period and rearranges the last one in it digit to the beginning of the number. For example, from the fraction, $0.123(56708)$ she will get $0.123(85670)$. What fraction will Alina get from fraction $\frac{503}{2022}$ ?