From 375300a6fbc9ff9984ad9801ef8708fa2420c08e Mon Sep 17 00:00:00 2001 From: Tekunov Daniil Date: Fri, 15 Jun 2018 11:27:48 +0300 Subject: [PATCH] Added problem 29 --- scala/Problem_29.scala | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 scala/Problem_29.scala diff --git a/scala/Problem_29.scala b/scala/Problem_29.scala new file mode 100644 index 0000000..706577c --- /dev/null +++ b/scala/Problem_29.scala @@ -0,0 +1,7 @@ +object Main extends App { + + //O(n^2) + def task = (for (a <- 2 until 101; b <- 2 until 101) yield BigInt(a).pow(b)).distinct.length + + print(task) +}