Hello, I'm Capricornian. I have a problem, which seems to be easy, but I have no idea how to achieve a solution of that problem in approriate time limit.↵
↵
Can you help me to figure it out and find how it works?↵
↵
This is the problem statement:↵
↵
Number Distribution↵
------------------↵
↵
Giving two integers A and B (A and B is in range [0..2E9]) and a non-negative integer T < 1E18.↵
↵
In one operation, this rule is followed :↵
↵
```c++↵
if (A < B)AB = 2 *B - A, BA = B - A2 * A, ;↵
elseBA = 2 *A - B, AB = A -2 * B;↵
```↵
↵
Calculate A and B after T operations. (I have figured out that if you do these sequences of operation↵
enough times, you will get back A and B in the beginning case, but I can't find the rule behind that).↵
↵
Thanks for helping !↵
↵
Capricornian.
↵
Can you help me to figure it out and find how it works?↵
↵
This is the problem statement:↵
↵
Number Distribution↵
------------------↵
↵
Giving two integers A and B (A and B is in range [0..2E9]) and a non-negative integer T < 1E18.↵
↵
In one operation, this rule is followed :↵
↵
```c++↵
if (A < B)
else
```↵
↵
Calculate A and B after T operations. (I have figured out that if you do these sequences of operation↵
enough times, you will get back A and B in the beginning case, but I can't find the rule behind that).↵
↵
Thanks for helping !↵
↵
Capricornian.