题目意思:
就是输出 n 个数字。 首先这一串数字是单调递增的。 第二是后面的数字不能被前面的数字整除。。 我感觉题目给的样例明显想误导人嘛。最后这句If there are multiple solutions you can output any one. 才是重点。。
题解:
因为 N<10000 而 数字大小 <1000000。。那太简单了。。 直接输出 100000 一直到 100000 + n-1。。就结束了。。不要问我为什么了。。这是小学问题了。。
/*
* @author ipqhjjybj
* @date 20130704
*
*/
#include <cstdio>
#include <cstring>
#include <iostream>
#define clr(x,k) memset((x),(k),sizeof(x))
#define MAX(a,b) ((a)>(b)?(a):(b))
#define MAXN 10000001
int main(){
int i,n;
while(scanf("%d",&n)!=EOF){
printf("1000000");
for(i=2;i<=n;i++)
printf(" %d",i+1000000);
printf("\n");
}
return 0;
}