Project Euler 11, 13

Posted: 18 January 2016

Question 11 Question 13

Alright. You must be wondering why I skipped 12. Well there’s an elegant solution to 12, which I haven’t thought of yet. I will get it to soon, and I will most probably just update this post than create a new one.

11 was fairly simple. Nothing too fancy.

13 is quite challenging. I didn’t realize it was a 50-digit number at first. unsigned long long can’t fit into that. I think this is where most people who start Project Euler will get their first experience in BigNum. Well, I could implement my own BigNum and split it into a few chunks, then propagate the carries. But I kinda did that before already. In fact, I did a project that requires implementation of a carry-save-adder for FPGA. That was HARD. I just used gmpy to solve it ;)