Guest User

Untitled

a guest
Oct 3rd, 2017
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.28 KB | None | 0 0
  1. from itertools import product as e
  2.  
  3. def f():
  4.   _,c=1,-1
  5.   while _:
  6.     for b in[_ for(a,b)in e(range(1,_+c+1),range(_+c+1,0,-1))if b**2**2==_-a**2]:
  7.       a,d=1,b
  8.       while~-d:d-=1;a*=d*d
  9.       c+=a%_
  10.       if _==2017:return c
  11.       break
  12.     _+=1      
  13.        
  14. print(f())
Add Comment
Please, Sign In to add comment