Created
April 3, 2015 19:45
-
-
Save felipeborges/984d65672a8724e7abb8 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
def crazy_pow(i): | |
a = i - 25 | |
b = 50 - i | |
return a*100 + b*b | |
for i in range(-100, 10000): | |
x = crazy_pow(i) | |
print("%d - %d expected = %d" % (i, x, i**2)) | |
if (x != i**2): | |
print("ERR") | |
break |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment