题目描述
A full moon casts some sort of spell on the cows and, like their cousins the wolves and coyotes, they bay at the moon -- mooing instead of howling, of course.
Each 'moo' lasts a certain amount of time. A short 'moo' might last time 1; a longer one might last time 24 or even 1,000,000,000 or longer (cows can really moo when they want to). No 'moo' will last more than or equal to 2^63.
It should come as no surprise that the cows have a pattern to their moos. Bessie will choose an integer c (1 <= c <= 100) that is the initial length of a moo.
After Bessie moos for length c, the cows calculate times for
subsequent moos. They apply two formulae to each moo time to yield even more moo times. The two formulae