Triplet Tricks
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 .
三元戏法
从三个数开始,每一步进行以下三种操作之一:
定义为使其中一个数变为零所需的最少步数。如果无法做到这一点,则。
例如,:
而,因为不存在使得其中一个数变为零的操作序列。
再定义。已知,。
求。
Gitalking ...