@echo off
set /p n=输入待开方数(0~89999999):
set a=2
:acr
set /a a=(n/a+a)/2,b=a*a
if %b% gtr %n% goto :acr
if %b% lss 0 goto acr
if %b% equ %n% goto :ok
set /a t=n-b,k=a
:loop1
set /a t*=100,x=k*20,m=10
:loop2
set /a m-=1,s=m*(m+x)
if %s% gtr %t% goto loop2
set /a t-=s,c+=1,k=k*10+m,r=r*10+m
if %c% lss 5 goto loop1
:ok
if not "%r%" == "" set a=%a%.%r%
echo 结果:%a%
pause>nul