Skip to main content
added 29 characters in body
Source Link
ovs
  • 60.6k
  • 3
  • 47
  • 161

Python 2, 68 bytes

Inefficient and somewhat boring approach.

lambda n:`n`in('%d'*2%(a*a,b*b)for a in range(1,n)for b in range(n))

Try it online!


Python 2, 8277 bytes

Much more efficient and interesting.

f=lambda n,d=10m=0,d=1:n/d and((d/11+n%10>0<d>n%d*10)==(n%dm*10<d!=10)**==n**.5%1+(n/d)**5%1+m**.5%1)|f(n/10,m+n%10*d,d*10)

Try it online!Try it online!

Python 2, 68 bytes

Inefficient and somewhat boring approach.

lambda n:`n`in('%d'*2%(a*a,b*b)for a in range(1,n)for b in range(n))

Try it online!


Python 2, 82 bytes

Much more efficient and interesting.

f=lambda n,d=10:n/d and((d/11+n%10>0<d>n%d*10)==(n%d)**.5%1+(n/d)**.5%1)|f(n,d*10)

Try it online!

Python 2, 68 bytes

Inefficient and somewhat boring approach.

lambda n:`n`in('%d'*2%(a*a,b*b)for a in range(1,n)for b in range(n))

Try it online!


Python 2, 77 bytes

Much more efficient and interesting.

f=lambda n,m=0,d=1:n and((m*10<d!=10)==n**.5%1+m**.5%1)|f(n/10,m+n%10*d,d*10)

Try it online!

Source Link
ovs
  • 60.6k
  • 3
  • 47
  • 161

Python 2, 68 bytes

Inefficient and somewhat boring approach.

lambda n:`n`in('%d'*2%(a*a,b*b)for a in range(1,n)for b in range(n))

Try it online!


Python 2, 82 bytes

Much more efficient and interesting.

f=lambda n,d=10:n/d and((d/11+n%10>0<d>n%d*10)==(n%d)**.5%1+(n/d)**.5%1)|f(n,d*10)

Try it online!