301922: CF364C. Beautiful Set

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Beautiful Set

题目描述

We'll call a set of positive integers $ a $ beautiful if the following condition fulfills: for any prime $ p $ , if ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF364C/de99426f3fbaa26518074daf10b8f9b390d1a140.png), then ![](https://cdn.luogu.com.cn/upload/vjudge_pic/CF364C/04ac8a5d83c7f06e74fe73e1ed271d0d74dd42cb.png). In other words, if one number from the set is divisible by prime $ p $ , then at least half of numbers from the set is divisible by $ p $ . Your task is to find any beautiful set, where the number of elements is equal to $ k $ and each element doesn't exceed $ 2k^{2} $ .

输入输出格式

输入格式


The first line contains integer $ k $ ( $ 10<=k<=5000 $ ) that shows how many numbers the required beautiful set should have.

输出格式


In the first line print $ k $ space-separated integers that are a beautiful set. If there are multiple such sets, you are allowed to print any of them.

输入输出样例

输入样例 #1

10

输出样例 #1

16 18 24 27 36 48 54 72 108 144 

Input

题意翻译

我们称一个由正整数构成的集合 $A$ 是**美丽的**,如果 $A$ 满足下面的条件: - 对于任意质数 $p$,如果 $\exists\,x\in A,x\equiv0\pmod p$,则 $|\{y\in A\mid y\equiv0\pmod p\}|\ge\frac{|A|}2$。 也就是说,如果集合 $A$ 中存在一个数能被某个质数 $p$ 整除,则 $A$ 中至少有一半数能被 $p$ 整除。 你的任务是找到一个美丽的集合,满足集合中恰有 $k$ 个正整数,并且每个数不超过 $2k^2$。注意集合是**不可重集合**,即集合中不能有重复数字。如果有多个解,输出任意一个即可。 $10\le k\le5000$。

加入题单

上一题 下一题 算法标签: