• + 0 comments
    g=[]
        for i in range(p,q+1):
          a=str(i**2)
          b=a[:len(a)//2]
          c=a[len(a)//2:]
          if c=='':
            c=0
          elif b=='':
            b=0
          if int(b)+int(c)==i:g.append(i)
        print('INVALID RANGE')if g==[]else print(*g)