Project Euler #206: Concealed Square

  • + 0 comments

    Enter your code here. Read input from STDIN. Print output to STDOUT

    n=int(input()) p=str(input()) lst=p.split() num=('').join(p.split()) d=lst[0] e=lst[0] for l in lst[1:]: d+='0'+l e+='9'+l a=int(d)**0.5 b=int(e)**0.5 for z in range(int(a),int(b)+1): k=(z**2) k=str(k) if k[::2]==num: print(z) break break