2014-11-02から1日間の記事一覧
Problem 47 using System; using System.Collections.Generic; class PE47 { // count distinct prime factors static int CountDistinctPrimes(int n) { var primeSet = new HashSet<int>(); while (n % 2 == 0) { primeSet.Add(2); n /= 2; } for (int i = 3; i</int>…