1 solutions
-
0
C++ :
#include<stdio.h> #define maxn 350 int num[maxn]={0},Map[205],pos=0; int main() { // freopen("B.in","r",stdin);//打开文件1.txt用来输入,文件需存在 // freopen("B.out","w",stdout);//打开文件2.txt用来输出,自动创建该文件 for(int i=2;i<maxn;i+=2) num[i]=1; for(int j=3;j<maxn;j+=3) num[j]=1; for(int i=0;i<maxn;i++) if(num[i])Map[++pos]=i; int n; while(~scanf("%d",&n)){ printf("%d\n",Map[n]); } return 0; }
- 1
Information
- ID
- 18118
- Time
- 1000ms
- Memory
- 64MiB
- Difficulty
- (None)
- Tags
- # Submissions
- 0
- Accepted
- 0
- Uploaded By