from math import sqrt M=10**9 ANS=[(0,M)] N=20000 while len(ANS)NG+1: mid=(OK+NG)//2 y=round(sqrt(M*M-mid*mid)) if y