407212: GYM102697 183 Number Destruction
Memory Limit:256 MB
Time Limit:1 S
Judge Style:Text Compare
Creator:
Submit:0
Solved:0
Description
183. Number Destructiontime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output This problem is worth 10 points.
After destroying half of all life in the universe, Thanos decides to destroy one-third of all positive integers in the universe. Thanos starts by destroying 0, and then proceeds to destroy any positive integers that are a multiple of 3.
Your task is to find the first $$$n$$$ integers that are left (have not been destroyed) after Thanos applies this operation. For example, the first 5 integers that are left are 1, 2, 4, 5, and 7.
InputThe only line of input consists of a single positive integer $$$n$$$: the number of integers to print.
OutputOutput $$$n$$$ lines: the first $$$n$$$ integers that were not destroyed by Thanos.
ExamplesInput5Output
1 2 4 5 7Input
11Output
1 2 4 5 7 8 10 11 13 14 16Input
3Output
1 2 4