09/09/03 20:52:31
>>18
using System;
namespace sosuu {
class Program {
static void Main(string[] args) {
bool[] buf = new bool[1000];
for (int i=0; i<buf.Length; i++) buf[i]=true;
for (int i=2; i<=buf.Length; i++) for (int j=i*2; j<=buf.Length; j+=i) buf[j-1]=false;
for (int i=0; i<buf.Length; i++) if (buf[i]) Console.Out.WriteLine(i+1);
}
}
}