Sunday, February 17, 2013

project euler problem 016

power digit sum

problem is simple. but a neat solution is not that easy.

There are many ways to solve this problem. mathematica, python, gmp, etc.

My first version also used my bigInteger class. But actually this is overkill. 

One may use two bitset as carry and one vector to solve this problem. I learnt
this in the discussion thread.

No comments:

Post a Comment