Code Challenge 29/03/2018: Non-abundant sums


For this challenge are are going for a more maths orientated question and where better than Project Euler.

See if you can solve this in a language of your choice.

Extra Credit:

  • Write tests
  • Think about the efficiency of your algorithm. Can you write your code a faster way. We encourage the use of benchmarking.

If you improve your code as a result of benchmarking then keep the previous code to showcase the progression of your code.



Surely not very fast, but let’s get the ball rolling!

JS implementation


I wrote a implementation in ruby, but it’s soooooo slow that I can’t see the result.

Update on 3rd April

Finally I got a working solution. But I don't know if I got the right result?
Here is it:

Ruby implementation

I can’t verify it because I don’t know the correct result of the sum. I’ve searched on the internet, only got this:

Numbers that are not the sum of two abundant numbers (not necessarily distinct).

My result is 395353134, it takes approximately one minute.

I just debugged my program, it doesn’t work again…:sob: