How to determine what will be equal to K at the end of our actions according to the algorithm?

How to determine what will be equal to K at the end of our actions according to the algorithm?

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:
All numbers A, B, C will become equal to 1. Just repeat the specified actions until all values are equal. It turns out like this: (A, B, C) will be consistently
(25, 2, 3)->(20, 2, 3)->(15, 2, 3)->(10, 2, 3)-> (5, 2, 3)->(5, 1, 3)->(1, 1, 3)->(1, 1, 1), after which the transition to the end.
With other initial data, this algorithm can reach negative numbers and loop (that is, the cycle will not end).
The cycle will be repeated 8 times, so at the end k = 9
7
(k, a, b, c) = (0, 25, 2, 3) while a != b or a != c: if a > b + c: a = a - b - c elif a == b + c: b = c - b else: c = c - a - b k = k + 1 print k, a, b, c Source: https://ru.stackoverflow.com/questions/106885/
All Articles