This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__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: |