Problem 416
A frog’s trip
A row of n squares contains a frog in the leftmost square. By successive jumps the frog goes to the rightmost square and then back to the leftmost square. On the outward trip he jumps one, two or three squares to the right, and on the homeward trip he jumps to the left in a similar manner. He cannot jump outside the squares. He repeats the round-trip travel m times.
Let
For example,
Find the last
青蛙的旅途
在一行n个方块的最左边一个上有一只青蛙。青蛙通过连续不断的跳跃,先跳到最右边的方块,然后再跳回最左边的方块。它向右跳的时候每次可以跳一个、两个或三个方块,跳回来时也同理。它不能跳出这些方块。这样的往返它一共进行了m次。
记
例如,
求
Gitalking ...