Starting with three numbers , at each step do one of the three operations:
change to ;
change to ;
change to ;
Define to be the minimum number of steps required for one number to become zero. If this is not possible then .
For example, :
However, as no series of operations leads to a zero number.
Also define .
You are given and .
Find .
876. 三元组技巧
现有三个数 。在接下来的每一步中,你可以进行如下三个操作之一:
令 。
令 。
令 。
记 为:使其中一个数变为 所需的最少步数,若不可能则令 。
例如,,可能的三步操作如下:
然而,,因为你无法通过上述操作使得任何数为 。
另外记 ,已知 、。
求 。
点 这个链接 回到源站。
点 这个链接 回到详细版题目目录。