2009-08-26から1日間の記事一覧
Problem 0009 : Prime Number #include <iostream> using namespace std; void eratos( bool primes[] ) { int i,j; for( i=0; i<1000000; i++ ) primes[i] = true; primes[0] = primes[1] = false; for( i=4; i<1000000; i+=2 ) primes[i] = false; for( i=3; i<10000</iostream>…