I started solving Project Euler problems this month. Check out the Project Euler tab of this blog for a list of the problems I’ve solved (with solutions) till date. Here’s a problem you might find interesting:

**Here’s my solution using Python (I basically search through the entire matrix which is of O(n²) complexity):**

I first copy the maxtrix into a text file **euler11.txt** so that it can be later read into Python

I then execute the following code from the same working directory as

**euler11.txt**
**Answer:** *70600674*

### Like this:

Like Loading...

This is a little bit late, but I just found this and think the loop sequence is very clean, but I was wondering why you wouldn’t substitute all your top lines for this:

problemMatrix = np.loadtxt(“euler11.txt”)

Is there some benefit to your method?

Really like the blog btw

LikeLiked by 1 person