Follows 543.c (Total 23 lines):

/* @JUDGE_ID:4461XX 543 C */
/* A */
#include<stdio.h>
#include<math.h>
long prim[10000] ;
void pri( void )
{
	long i , j , k , yes ;
	prim[0] = 2 ;
	for( i=1 , j=3 ; i<10000 ; j++ ){
		yes = 0 ;
		for( k=2 ; k<=sqrt(j) ; k++ )
			if( j%k == 0 ) yes = 1 ;
		if( yes == 0 ){
			prim[i++] = j ;
			printf( "%ld " , j ) ;
		}
	}
}
void main( void )
{
	pri() ;
}

Back to statistics
Ya-Lin Huang (C)
huangyl@gmail.com