心如止水
Je n'ai pas le temps
posts - 400,comments - 130,trackbacks - 0

一直在超时,无奈交表。有时候交表是一个不错的办法~

以下是我的代码:

#include<stdio.h>
int main()
{
    
long a[8][100]={
         
{2,3,5,7},
         
{23,29,31,37,53,59,71,73,79},
         
{233,239,293,311,313,317,373,379,593,599,719,733,739,797},
         
{2333,2339,2393,2399,2939,3119,3137,3733,3739,3793,3797,5939,7193,7331,7333,7393},
         
{23333,23339,23399,23993,29399,31193,31379,37337,37339,37397,59393,59399,71933,73331,73939},
         
{233993,239933,293999,373379,373393,593933,593993,719333,739391,739393,739397,739399},
         
{2339933,2399333,2939999,3733799,5939333,7393913,7393931,7393933},
         
{23399339,29399999,37337999,59393339,73939133}
    }
;
    
int n,i;
    scanf(
"%d",&n);
    i
=0;
    
while( a[n-1][i]!=0 )
    
{
       printf(
"%ld\n",a[n-1][i]);
       i
++;
    }

return 0;
}

posted on 2010-01-06 19:17 lee1r 阅读(254) 评论(0)  编辑 收藏 引用 所属分类: 题目分类:数学/数论

只有注册用户登录后才能发表评论。
网站导航: 博客园   IT新闻   BlogJava   知识库   博问   管理