- Superprime
- 2016-02-03 21:44:27 @
#include<iostream>
#include<cstring>
#include<cmath>
#include<cstdio>
#include <string>
#define MAX 2000
#define state(a,b)able[a][b]
using namespace std;
bool zs(long long n){
if(n==1)return 0;
if(n==2){
return 1;
}
else {
for(long long i = 2;i<n;i++){
if(!(n%i)){
return 0;
break;
}
}
}
return 1;
}
int main(){long long n;
cin>>n;
long long i;
int sqr[10];
for(int j = 0;j<n+1;j++){
sqr[j]=pow(10,j);
}
for(i = 2*sqr[n-1];i<sqr[n];){
for(int j = n-1;j>=0;j--){
if(!zs(i/sqr[j])){
i+=sqr[j];
break;
}
if(j==0){
cout<<i<<endl;
i++;
}
}
}
}