Skip to main content
deleted 36 characters in body
Source Link
Wasif
  • 12.4k
  • 1
  • 18
  • 47

Python 3.8 (pre-release), 12092 bytes

f=lambda n,x=1:x<len(n)and all(e[0]!='0'for e in [n[:x],n[x:]])and='0'and all(int(ye)**.5%1==0for y ine [n[in[n[:x],n[x:]])or f(n,x+1)

Try it online!Try it online!

Error-28 for falsey@ophact's tip

Python 3.8 (pre-release), 120 bytes

f=lambda n,x=1:x<len(n)and all(e[0]!='0'for e in [n[:x],n[x:]])and all(int(y)**.5%1==0for y in [n[:x],n[x:]])or f(n,x+1)

Try it online!

Error for falsey

Python 3.8 (pre-release), 92 bytes

f=lambda n,x=1:x<len(n)and all(e[0]!='0'and int(e)**.5%1==0for e in[n[:x],n[x:]])or f(n,x+1)

Try it online!

-28 for @ophact's tip

Source Link
Wasif
  • 12.4k
  • 1
  • 18
  • 47

Python 3.8 (pre-release), 120 bytes

f=lambda n,x=1:x<len(n)and all(e[0]!='0'for e in [n[:x],n[x:]])and all(int(y)**.5%1==0for y in [n[:x],n[x:]])or f(n,x+1)

Try it online!

Error for falsey