Scala: Project Euler problem 16

by Gregor Uhlenheuer on July 17, 2012

This will be the solution of the sixteenth problem of Project Euler:

2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26.

What is the sum of the digits of the number 2^1000?

I am using my own version of pow here because it seems that the scala standard method from scala.math does not support BigInt which is obviously needed for this problem (or at least for my way of solving it *g*).

This post is tagged with euler, scala and programming