B. Hungry Sequence time limit per test 1 second memory limit per test 256 megabytes input standard input output standard output Iahub and Iahubina went to a date at a luxury restaurant. Everything went fine until paying for the food. Instead of money…
Let's call the following process a transformation of a sequence of length nn. If the sequence is empty, the process ends. Otherwise, append the greatest common divisor (GCD) of all the elements of the sequence to the result and remove one arbitrary e…