#P1261. Math!!!
Math!!!
题目描述
One day Zsh discovers an interesting problem,For any positive integer , if it is even, cut it in half; if it is odd, cut in half. Keep doing again and again, and you must get at some point. For example,if ,let's do it.
-
,,
-
,,
-
,
-
,
-
,
In the fifth step ,so we can stop.
To avoid double counting, you can record each number visited during the recursion. For example, when verifying , we need to calculate . Then, when we verify , we can directly determine the result of the conjecture without repeating the calculation, because these 4 numbers have already been visited when verify , and we call and the numbers that cover . We call a number which in a series is a "key number" if and only if cannot be covered by any other numbers in the series.
Given a series of numbers to be verified, we only need to verify a few of the key numbers, so that we don't have to repeat the verification for the rest of the numbers. Your task is to find these key numbers and output them in order from the largest to the smallest.
输入格式
he first line contains an integer () .
The second line contains integers () .
输出格式
Output the key numbers in order from the largest to the smallest.
样例
6
3 5 6 7 8 11
7 6