samskivert: Euler 029

23 February 2008

Problem 029:

object Euler29 extends Application {
  println((for {
    a <- List.range(2, 101)
    b <- List.range(2, 101)
  } yield BigInt(a).pow(b)).removeDuplicates.length);
}

This one's pretty easy thanks to BigInt.

©1999–2015 Michael Bayne