Skip to content

Instantly share code, notes, and snippets.

View mpetyx's full-sized avatar

Michael Petychakis mpetyx

View GitHub Profile
@mpetyx
mpetyx / pytriplets
Last active August 29, 2015 14:07 — forked from VHarisop/pytriplets
__author__ = 'mpetyx'
''' Pythagorean triplets are integers (a, b, c) for which the property
a^2 + b^2 = c^2 holds. The following script is a dummy implementation that runs in 12.5s '''
lim = 500
for i in range(1, lim):
for j in range(i+1, lim):
for k in range(j+1, lim):
if i**2 + j**2 == k**2: