/* cs */ /* * Problem : DIVISOR * Contest : UOI-2006 (Dnepropetrovsk) * Type : Solution * Date : March 22, 2006 * Author : Shamil Yagiyayev * Language : C# * Compiler : .NET 1.1 * Algorithm: Author Solution */ using System; using System.IO; class Divisor { static readonly string FILE_IN = "divisor.dat"; static readonly string FILE_OUT = "divisor.sol"; static int ReadData() { StreamReader sr = new StreamReader(FILE_IN); string line = sr.ReadLine(); return int.Parse(line); } static long Process(int n) { int[] cnt = new int[n+1]; // everything is 0 bool[] prime = new bool[n+1]; // everything is false for (int i=2; i<=n; i++) { int curr = i; for (int j=2; j