Skip to content

Instantly share code, notes, and snippets.

View kmonsoor's full-sized avatar
:octocat:

Khaled Monsoor kmonsoor

:octocat:
View GitHub Profile
@kmonsoor
kmonsoor / euler_41.py
Created January 20, 2014 03:48
My solution for ProjectEuler problem# 41
def is_triangle(w):
return sum([ord(c)-64 for c in w]) in TN
L = list(eval(open('words.txt').readlines()[0])) #loading data
# creating triangle number list as i don't want to check triagulity every time
i,TN = 0,[]
for j in range(1,30):
i += j; TN.append(i)