Diabolic Doofenshmirtz
문제
Each year, the fastest platypuses of the world come together for the Great Crawling Platypus Cup (GCPC) to crawl a single lap in the platypus arena. Of course, Perry the platypus wants to take part in this great event. Perry's arch enemy Dr. Doofenshmirtz got wind of it and plans to capture Perry right when he crosses the finish line at the GCPC. To carry out his evil plan successfully, he needs to find out how long Perry needs to finish the lap. He knows that Perry takes the preparation for the GCPC very seriously and trains by crawling lap after lap in the arena at a constant speed of . Perry's training starts this Saturday and Dr. Doofenshmirtz knows that he will run at least seconds. To determine the exact length of one lap, Dr. Doofenshmirtz invented the Measurinator which can measure the exact distance Perry has already crawled in his current lap. Unfortunately, the Measurinator will break after too many measurements, so Dr. Doofenshmirtz has to carefully plan when to use it in order to determine the length of one lap.
예제
예제 1
1 2 3 4 16
? 1 ? 2 ? 3 ? 4 ? 100 ! 42
예제 2
10 20 30 40 641
? 10 ? 20 ? 30 ? 40 ? 10000 ! 1337