Square Root a Number my Way Now that we know how to Square a Number my Way, we need an inverse operation, a way to Square Root a Number my Way.  To square a number my way, you simply stack it on top of itself a number of times equal to the number of digits it contains, and then take read off every number that is formed both vertically and horizontally, and then add them together.  More information about squaring a number in this manner can be found here.  To square root a number my way, you simply take the number that has the least decimal digits that squares (my way) to make the number you are square rooting.  For example, since 12 can be formed by squaring 6, and there are no numbers with fewer decimal digits that can be squared to form 12, the square root of 12 is 6.  

Your Task:

Write a program or function that takes an integer and square roots it as outlined above.  

Input:

An integer or string

Output:

A float or string square rooted as outlined above.  

Test Cases:

1263 -&gt; 125
57   -&gt; 12


Scoring:

This is code-golf, lowest score in bytes wins!
Python 2, 101 bytes

Ports from my answer to square the numbers my way.



x,z=1,input()
while sum(float(i*len(z))for z in[[i for i in`x`if"/"&lt;i]]for i in[x]+z)!=z:x+=1
print x


Try it online!