T1 syx reward

This problem is clearly sign the title bar

Of course, a guess conclusion title

Let me talk about how to do it, all the numbers can go up gcd and then with n seek gcd, if 1, the output n, if not 1, then output -1

Certify as follows:

∵gcd (all possible numbers, n) = 1,

∴ y must be feasible that the number of steps, such that gcd (x, y) <= x

Then mathematics summarize, we concluded a duck

Guess you like

Origin www.cnblogs.com/sunyx20060115/p/11595081.html