[Question]
  [
This idea came to me when I saw my little brother playing with my calculator :D
# The task
Taking a integer as an input, print that many graphical square roots under each other, like this:
```
n = 1
  ___
\/ 1
n = 3
    _______
   / _____
  / / ___
\/\/\/ 3
n = 5
      ___________
     / _________
    / / _______
   / / / _____
  / / / / ___
\/\/\/\/\/ 5
n = 10
           ______________________
          / ____________________
         / / __________________
        / / / ________________
       / / / / ______________
      / / / / / ____________
     / / / / / / __________
    / / / / / / / ________
   / / / / / / / / ______
  / / / / / / / / / ____
\/\/\/\/\/\/\/\/\/\/ 10
```
Each root consists of 4 parts, which I'm going to very scientifically name:
(s is the root size on the stack of roots, n is the input number, x is the number of digits)
1. The "tail", which is a single `\`
2. The "wall", which consists of `/` \* s
3. The "roof", which consists of `_` \* 2 \* s + x
4. And the number n under the smallest root, placed in the centre (leaving one empty space under the last `_` in the smallest root)
# Input
You must take input of the number `n`, no hardcoding the `n`
# Output
The ascii roots your program made
This is a code-golf challenge, so lowest byte count for each language wins!
  
[Answer]
# [Python 2](https://docs.python.org/2/), ~~104~~ ~~94~~ ~~89~~ ~~81~~ 79 bytes
```
s=n=input()
while s:print' '*s,'/ '*(n-s)+'_'*(2*s+len(`n`));s-=1
print'\/'*n,n
```
[Try it online!](https://tio.run/##JY1BCsIwEEX3c4rsJpO21ES6qeQmgoU60ECZBieinj5GXP23eLyfP2U7JNT1uLOJBhGrRolJ8rNYgteWdjY650eSggad9ji2sTIodXhrFJx2O4tdZCG66BA9/O3riE56qa0J/ObV/j7cRNVDgDNM4E9f "Python 2 – Try It Online")
Edit 1: Forgot I switched to python 2 lol
Edit 2: Thanks @ElPedro for the idea of switching to while loop!
Edit 3: Thanks @SurculoseSputum for saving 8 bytes!
Edit 4: Thanks @xnor for saving 2 bytes!
[Answer]
# JavaScript (ES6), ~~104 102~~ 99 bytes
A recursive function starting with the last line and using regular expressions to update each line above.
```
f=(n,s='\\/'.repeat(n)+(e=' ')+n)=>~n?f(n-1,e+s.replace(/\\/g,e).replace(/.(?!.*\/)/g,'_'))+`
`+s:e
```
[Try it online!](https://tio.run/##RY3BDoIwEETvfMV66q4LRa9i5UdIpMGFaMiWUOLF6K/XevI0k5c3mYd/@jis92WrNNwkpdGhltGZrquNXWURv6ESozgDhljJXT7ajqjVsRSOP2X2g2CdB1Mp9AcW253ddzVlbq6GiPui53iSNIYVFRwcG1A45zzkwkzwKgCGoDHMYucwYb4haop3@gI "JavaScript (Node.js) – Try It Online")
## How?
### Initialization
We generate the bottom line with:
```
s = '\\/'.repeat(n) + (e = ' ') + n
```
For instance, this gives `"\/\/\/\/ 4"` for \$n=4\$.
### Recursion
We get rid of the backslashes with:
```
s.replace(/\\/g, e)
```
We create the 'roof' or increase its size with:
```
.replace(/.(?!.*\/)/g, '_')
```
which means: replace with an underscore each character that doesn't have any slash on its right.
This leads to:
```
 _________
 / _______
 / / _____
 / / / ___
\/\/\/\/ 4
```
And with a leading space inserted at each iteration:
```
     _________ 
    / _______ 
   / / _____ 
  / / / ___ 
\/\/\/\/ 4 
```
[Answer]
# [Erlang (escript)](http://erlang.org/doc/man/escript.html), 188 bytes
```
f(0,N)->string:copies("\\/",N)++" "++integer_to_list(N);f(X,N)->string:copies(" ",X+1)++string:copies("/ ",N-X)++string:copies("_",2*X+floor(math:log10(N)+1))++"
"++f(X-1,N).
f(N)->f(N,N).
```
[Try it online!](https://tio.run/##fY3LCoMwEEX3foVkNWkSHy3dWPATXAdqESmJDcREYqCfn46rQi3OYmDu4c5RwY5uEmp9BrPElCUNFe@oaNcYjJuap1@MWoH0fUkwZ4zkhDHjoppUGKIfrFkjdPSmQf7r5YRLVmPvJy8RdELuwUD4@SSZtt4HmMf4aqyf6goV@GbzZ@hHmahRV2QaNinu7UrzaBzcHzQXbZbjGN/odzBRgQZsc7ydBcp38HIEr0ewrr60SB8 "Erlang (escript) – Try It Online")
# Explanation
```
f(N)->f(N,N).   % Assign the counter to the input.
f(X,N)->        % While the counter isn't 0:
string:copies(" ",X+1)
                %     Repeat the space counter + 1 times
++string:copies("/ ",N-X)
                %     Repeat "/ " input - counter times
++string:copies("_",
                %     Repeat the "_" that many times:
2*X             %     The counter doubled
+floor(math:log10(N)+1)
                %     Plus the length of the digit(s) of the input
++"
"               %     Join the above, and append a newline
++f(X-1,N).     %     Decrement the counter by 1
f(0,N)->        % If the counter turns into 0:
string:copies("\\/",N)
                %     Repeat "\/" input times
++" "           %     Append a space
++integer_to_list(N);
                %     Append the number converted into a string
```
```
[Answer]
# Mathematica (Notebook) 30 bytes
Only in Spirit ;-)
```
Nest[Defer@√#&,#,#]&@Input[]
```
produces the nested radicals
[![enter image description here](https://i.stack.imgur.com/sb6iZ.png)](https://i.stack.imgur.com/sb6iZ.png)
in the spirit but not the letter of the problem.
# Explanation
```
Input[]              //take input
Nest[f,expr,n]       //apply f to expr n times i.e. f[f[f[f[f....[expr]]..]] with n fs
Nest[f,#,#]&         //define a lambda that applies f to arg #, # times
Nest[f,#,#]&@Input[] //apply the lambda Nest[f,#,#]& to the value of Input[]
√#&                  //define a lambda that puts arg # inside √
Defer@√#&            //define a lambda that puts arg # inside √ buts keeps the mathematical square root unevaluated
Nest[Defer@√#&,#,#]&@Input[]
                     //apply the lambda Defer@√#& to Input, Input no of times 
```
[Answer]
# [05AB1E](https://github.com/Adriandmen/05AB1E), 30 bytes
-4 bytes thanks to Kevin Cruijssen.
```
Lε-„/ ×'_y·¹g+×«y>ú}R„\/¹×¹‚ª»
```
[Try it online!](https://tio.run/##yy9OTMpM/f/f59xW3UcN8/QVDk9Xj688tP3QznTtw9MPra60O7yrNggoE6N/aCdQYOejhlmHVh3a/f@/oQEA "05AB1E – Try It Online")
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), 34 bytes
```
VQj*N"/ ",*hJ-QNd*+l`QyJ\_;jd,*"\/
```
[Try it online!](https://tio.run/##K6gsyfj/PywwS8tPSV9BSUcrw0s30C9FSzsnIbDSKybeOitFR0spRv//f0MDAA "Pyth – Try It Online")
```
VQ
```
Loop the variable `N` over `0` to `Q` (the input) minus 1
```
j*N"/ "
```
Join the following using `N` instances of `"/ "`:
```
,
```
The two element list of...
```
*hJ-QNd
```
... {`Q` - `N` + `1`} space characters (`d` is the space character in Pyth). Store the value of `Q` minus `N` in the variable `J` so we can use it later.
```
*+l`QyJ\_
```
... {`J` times 2, plus the number of digits of `Q`} instances of the string `"_"`
```
;
```
End of loop
```
jd,*"\/
```
Join the following using a space:
* `Q` instances of the string `"\/"`
* `Q` casted to a string
Conveniently, the string literal is implicitly closed, and the two `Q`s are implicitly appended to the end of the program.
[Answer]
# [PowerShell](https://github.com/TryItOnline/TioSetup/wiki/Powershell), ~~88~~ 84 bytes
```
param($n)1..$n|%{' '*($m=$n- --$_)+' /'*$_+' '+'_'*(2*$m+"$n".length)}
'\/'*$n+" $n"
```
[Try it online!](https://tio.run/##FYpBCoAgEADvvUJkY1PRsHs/CcSD1EG3qKBD9fbNTgMzs61X2o8l5cy8xT2WDkh554Ce9kaBuoMyAllhLQRlUPSoIVSiwVDroKEYCSRdTjSfi3obnP6HjBRVM7P3Hw "PowerShell – Try It Online")
[Answer]
# [Charcoal](https://github.com/somebody1234/Charcoal), 30 bytes
```
ＮηＧ↙η←⁺²Ｌθ↖η_Ｍη↘Ｐθ←←Ｆη«Ｐ↗⊕ι←/\
```
[Try it online!](https://tio.run/##XY7LCsIwEEXX7VeErhJI8bGsWzeFKkVwV5Ba0yaQTmpMKiJ@e0xaEXE3mdxz5ja81o2qpXM5DNbsbX9mGnOyiUslH50CnG3VHQrWGoo4Rdk8ldLe8JqigkFnOL4S4r@OwzeWnBKv2KmR4QAFxUF03ISllUYMWoDx2CczWf8frdLIN0HPOPph/JXJRFEOjWY9A8MuWBAPROWcmFski6oKJV7OrZYuHeUb "Charcoal – Try It Online") Link is to verbose version of code. Explanation:
```
Ｎη
```
Input `n` as a number.
```
Ｇ↙η←⁺²Ｌθ↖η_
```
Print the "roof", ensuring that it is long enough to overhang `n`.
```
Ｍη↘Ｐθ←←
```
Print `n` as a string in the appropriate place.
```
Ｆη«
```
Loop `n` times.
```
Ｐ↗⊕ι
```
Print the next diagonal line of the "wall".
```
←/\
```
Print the next part of the "tail".
[Answer]
# [MATL](https://github.com/lmendo/MATL), 43 bytes
```
:P"@QZ"47Oh1X@qX"95GVn@E+Y"hh]'\/'1GX"0GVhh
```
[Try it online!](https://tio.run/##y00syfn/3ypAySEwSsnE3D/DMMKhMELJ0tQ9LM/BVTtSKSMjVj1GX93QPULJwD0sI@P/f0MDAA "MATL – Try It Online")
First time I have used `X"`, `Y"`, `Z"` in the same answer!
[Answer]
# [Jelly](https://github.com/DennisMitchell/jelly), 36 [bytes](https://github.com/DennisMitchell/jelly/wiki/Code-page)
```
DLṭ1j+1,-,2×Ɱ$“ “/ “_”ẋ"ⱮṚṄ€ȧ⁾\/ẋ,⁸K
```
A full program which prints the result.
**[Try it online!](https://tio.run/##y0rNyan8/9/F5@HOtYZZ2oY6ujpGh6c/2rhO5VHDHAUg1gcR8Y8a5j7c1a0EFH@4c9bDnS2PmtacWP6ocV@MPlBY51HjDu////8bGgAA "Jelly – Try It Online")**
### How?
```
DLṭ1j+1,-,2×Ɱ$“ “/ “_”ẋ"ⱮṚṄ€ȧ⁾\/ẋ,⁸K - Main Link: integer, n
D                                    - digits (n)
 L                                   - length
  ṭ1                                 - tack to one
    j                                - join with (n)
             $                       - last two links as a monad - f(n):
      1,-,2                          -   [1,-1,2]
            Ɱ                        -   map across [1..n] with:
           ×                         -     multiplication
     +                               - add (left to each of right, vectorised)
              “ “/ “_”               - [' ', '/ ', '_']
                        Ɱ            - map across (the list of list of numbers) with:
                       "             -   zipped:
                      ẋ              -     repetition
                         Ṛ           - reverse
                          Ṅ€         - print each with trailing newlines
                            ȧ        - logical AND (with n) -> n
                             ⁾\/     - ['\', '/']
                                ẋ    - repeat (n times)
                                 ,⁸  - pair with n
                                   K - join with a space
                                     - implicit print
```
[Answer]
# [MathGolf](https://github.com/maxbergmark/mathgolf/blob/master/math_golf.txt), 32 [bytes](https://github.com/maxbergmark/mathgolf/blob/master/code_page.py)
```
{kî-⌠ *_£(∞k£+'_*û/ ï*\n}û\/k* k
```
[Try it online.](https://tio.run/##AUEAvv9tYXRoZ29sZv//e2vDri3ijKAgKl/CoyjiiJ5rwqMrJ18qw7svIMOvKlxufcO7XC9rKiBr//8xCjMKNQoxMAoxMg)
**Explanation:**
```
{             # Loop the (implicit) input amount of times:
 k            #  Push the input-integer
  î-          #  Subtract the 1-based loop-index
    ⌠         #  + 2
      *       #  And repeat that many spaces
 _            #  Duplicate this string
  £           #  Pop and push its length
   (          #  + 1
    ∞         #  * 2
     k        #  Push the input-integer again
      £       #  Pop and push its length
       +      #  Add those two integers together
        '_*  '#  And repeat that many "_"
 û/           #  Push the 2-char string "/ "
    ï*        #  And repeat it the 0-based loop-index amount of times
 \            #  Then swap the top two strings on the stack
 n            #  And push a newline character
}û\/k*        # After the loop: repeat 2-char string "\/" the input amount of times
              # Push a space
 k            # And push the input-integer
              # (after which the stack is joined together and output implicitly)
```
[Answer]
# Wolfram Mathematica 120 bytes
```
a=StringRepeat;b=Print;Input[];
b[a[" ",#+1],a["/ ",%-#],a["_",2#+IntegerLength[%]]]&/@Range[%,1,-1];b[a["\/",%]," ",%];
```
[![enter image description here](https://i.stack.imgur.com/OnpRn.png)](https://i.stack.imgur.com/OnpRn.png)
# Explanation
```
StringRepeat[str,n]         
                      //creates a string with str repeated n times
a=StringRepeat            
                      //alias for StringRepeat
Print[expr1,expr2,...]    
                      //prints expr1, expr2,... on a newline without separation
b=Print  
                      //alias for Print
Input[] 
                      //gets user input, 
;
                      //Hide implicit output
%   
                      //last output
IntegerLength[n]
                      //no of digits in n in base 10
a[" ",#+1]            
                     //Make a lamba StringRepeat with arg #, that prints " ",#+1 times
b[a[" ",#+1],a["/ ",%-#],a["_",2#+IntegerLength[%]]]& 
                     //Make a lambda with arg # that
                     //prints the appropriate "     /_________" 
                     //depending on #
b[....]&/@Range[%,1,-1]; 
                     //map the lambda b[....] over {%,%-1,%-2,...,1}
b[a["\/",%]," ",%]; 
                     //print the last row "\/\/\/...\/ "
```
[Link to notebook](https://www.wolframcloud.com/obj/310c0ac3-2b2d-40d7-806c-73b82462172c)
[Answer]
# [C# (Visual C# Interactive Compiler)](http://www.mono-project.com/docs/about-mono/releases/5.0.0/#csc), ~~217~~ 154 bytes
```
n=>Join("",Range(0,n).Select(i=>new S(' ',n-i+1)+new S('/',i*2)+new S('_',(n-i)*2-~(n+"").Length)+'\n').Concat(Repeat("\\/",n))).Replace("//", "/ ")+" "+n
```
[Try it online!](https://tio.run/##bZA9T8MwEIZn/CssL7Frx2m7psmCYECdmoElEkqtSzgpvUDsCCEEfz2cEDAgpvfuue8LMQ8R1yUiDTKmLmGQzWtMcPFNmhmW4r/YEenZ39Bygbk7j/CT1Mjqb/XtQuGAlFz8AnVfrVTVdxOSVsqdOhpAbx0Z38AIIWmsaoIX2ehMZo5ytDtjv0GROdzsf92HzGlOMJt9/qHJKmX8EWhIj8ZmLWXGX08UuqRP8AQsqm0LxYOM8UzGLoBWBROpCqmMVVJZWksh@mmWmheWyMfsSpYD65YNa414E1fcNk4j@PsZE/AjQPcajSnF@/oJ "C# (Visual C# Interactive Compiler) – Try It Online")
Edit: Removed 19 bytes thanks to @KevinCruijssen, and used the header better(?)
[Answer]
# [Haskell](https://www.haskell.org/), 129 bytes
```
x%s=[1..x]>>s
0#b=b%"\\/"++' ':show b
x#b=(x+1)%" "++(b-x)%"/ "++(show b>>"_")++x%"__"++'\n':(x-1)#b
f x=x#x
main=interact$f.read
```
[Try it online!](https://tio.run/##JYvRCsIgGEbvfQrRREXmssuBvkiGaDk2tgzmoP/tbdXd4TvfmWJd8rq2Bqzaq9Eabs5VdKbJJka874lSHPOhTq83TgiOXYAykhF8GJE6OLD/8f/iHAlEKgWMhPCNfeGDgM5ImtCIwQIF9IxzsXPZ8xbv@2nUW46P1szlAw "Haskell – Try It Online")
Ties [the existing 129 byte answer](https://codegolf.stackexchange.com/a/204559/56656) but is compliant with the challenge by performing full IO.
[Answer]
# [Retina 0.8.2](https://github.com/m-ender/retina/wiki/The-Language/a950ad7d925ec9316e3e2fb2cf5d49fd15d23e3d), 77 bytes
```
^
$.'$*_=$'$*/¶$'$*V 
/
=$.%'$*=¶  $.%'$* $`
=
__
(_+)(/+)
$2$1
/
/ 
V
\/
1A`
```
[Try it online!](https://tio.run/##K0otycxL/P8/jktFT11FK95WBUjqH9oGosIUuPS5bFX0VIFs20PbFBQgTAWVBC5brvh4Lo14bU0NfW1NLhUjFUOgUn0FrjCuGH0uQ8eE//8NDQA "Retina 0.8.2 – Try It Online") Explanation:
```
^
$.'$*_=$'$*/¶$'$*V 
```
Insert some working elements: enough `_`s to cover the input, a `/` for each input, then on the next line, a `V` for each input (representing `\/`) and a space.
```
/
=$.%'$*=¶  $.%'$* $`
```
Now expand the `/`s into a bottom right triangle, and also add extra `_`s to overhang on both sides on each line.
```
=
__
```
Expand the `=`s which were placeholders for two `_`s.
```
(_+)(/+)
$2$1
```
Move the input cover next to the rest of the overhang.
```
/
/ 
```
Space the `/`s apart.
```
V
\/
```
Expand the `V`s on the last line.
```
1A`
```
Delete some left-overs.
[Answer]
# [Haskell](https://www.haskell.org/), 129 bytes
```
r=replicate
c=(concat.).r
f n|s<-show n=unlines$map(\o->r(n-o+1)' '++c o"/ "++r(2*(n-o)+length s)'_')[0..n-1]++[c n"\\/"++" "++s]
```
[Try it online!](https://tio.run/##FYzBDoIwEAXvfMWGmLR1oYjGm/gFevIIhDRNEWLZkhbixX@vcHvJzLxBhY@xNkZfeTPbUavFJLri2tE2pZA@6YF@4ZaHwX2BqpXsSCYcJjXzxuV3zyl3WAoGDFGDSwtIET0/H3cg0Bp6LwMEwTom6pOUlJctYq2B0qYpNjfdg9DGSY0EFSQA2/ezAz6vy2vxDwIJvYC6zC7ZNStPbfwD "Haskell – Try It Online")
[Answer]
# Java 11, ~~137~~ 124 bytes
```
n->{String l="\\/".repeat(n)+" "+n,r=l;for(;n-->0;r=l+"\n"+r)l=" "+l.replace('\\',' ').replaceAll(".(?!.*/)","_");return r;}
```
-13 bytes by porting [*@Arnauld*'s JavaScript answer](https://codegolf.stackexchange.com/a/204532/52210), so make sure to upvote him!
[Try it online.](https://tio.run/##NZDBTsMwDIbvewqTSxOaZhuIC1GHeAB24bhOKOsylJG5VZoOoarPXhxWDrZk57fz/T6bqynOx6@p9qbr4M04HBYADqMNJ1Nb2KYS4D0Gh59Qc3oBFJqa44JSF010NWwBoYQJi80wK33JqmrJVLCtNZGjyBmwHGUovT41gWssis1KU5mzClkeBE2QwqcJTz/zrKoymUEm/juv3nOm@Mudul8KJtkHEzrY2AeEoMdJJ562P3jimbGujTvChTzxG9VuD0bcDCWG5MXBM6D9To53@2Et4VHCk4T1iuJhFH9asv/TRXtRTR9VS4uiR46KjiHmS4zTLw)
**Explanation:**
```
n->{                       // Method with integer parameter and String return-type
  String l=                //  Temp-String `l` for the current line, starting at:
           "\\/".repeat(n) //   The input amount of "\/"
           +" "+n,         //   appended with a space and the input
         r=l;              //  Result-String, starting at this (last) line
  for(;n-->0               //  Loop `n` amount of times:
      ;                    //    After every iteration:
       r=l+"\n"+r)         //     Prepend the new `l` with newline to the result-String
    l=                     //   Change `l` to the new line:
      " "                  //    A space
      +l                   //    appended with the current line, with the replacements:
        .replace('\\',' ') //     All '\' replaced with spaces
        .replaceAll(".(?!.*/)","_");
                           //     And all characters NOT followed by a '/' with a "_"
  return r;}               //  And return the result-String after the loop
```
[Answer]
# [Julia](https://julialang.org/), 107 bytes
```
n=parse(Int,readline())
println.([[" "^(s+1)*"/ "^(n-s)*"_"^(2s+length("$n")) for s=n:-1:1];"\\/"^n*" $n"])
```
[Try it online!](https://tio.run/##FclLCsIwFAXQuasIDwd5/VjiRKh0AV1DPxIwakq4lrwI7j7G2YGzfYK35pszht1GcXpEaqKz9@DhNPNhjx4p4KSniRStWmrDFXV/opXCW9FZ6uDwTC9NRxCzeryjkgF9a3qzXGmeO1pRkSq7cM6XHw "Julia 1.0 – Try It Online")
## Breakdown
```
n = parse(Int, readline())
println.([ # broadcasting with `.` applies `println` to each element of vector
    [
        " "^(s + 1)*"/ "^(n - s)*"_"^(2s + length("$n"))
        for s ∈ n:-1:1 # array comprehension
    ];   # semicolon enables blockmatrix-style array syntax...
         # ...which unpacks elements in array above into elements of vector
    "\\/"^n*" $n" # last element of vector
])
```
[Answer]
# [Python 3](https://docs.python.org/3/), ~~100~~, 99 bytes
```
n=int(input())
for i in range(n):print(" "*(n+~i)," /"*i,"_"*(2*n-2*i+len(str(n))))
print("\/"*n,n)
```
[Try it online!](https://tio.run/##LcuxCoNAEITh3qdYtto9L8RoJ/gmAbEwuhDG4zyLNHn18wSn/Pkm/NK6ocsZgyGJIRxJVKvPFsnIQHHCMgu0D/ECTOwE9d/UMz3ZmeexlNbh0TqrvzNkT7H4suq@vIuDh@b8ak4 "Python 3 – Try It Online")
thnx to @KevinCruijssen for -1
[Answer]
# [Perl 5](https://www.perl.org/) `-ap`, 86 bytes
```
$\=$/.'\\/'x$_." $_";$_=$"x($_+1).'_'x(2*$_+y///c);for$a(1.."@F"-1){say;s, /| __,/ ,g}
```
[Try it online!](https://tio.run/##DcfBCgIhEADQXxEZUEtn1sCTLHTq1h8Ig0RFEClrB5fq17Pe7dXzcg9jQJqBUKVEqgOjFMAyAs8guwbeeoOKVde7zT8rEZ1MvJQFsvaIcn@QzptXy2tsVtBbMFsS9voZI3xLfd7Kow13DDj5abhcfw "Perl 5 – Try It Online")
[Answer]
# [CJam](https://sourceforge.net/p/cjam), 46 bytes
```
li:A:B;{A)S*"/ "BA-*'_2A*Bs,+*NA(:A}g"\\/"B*SB
```
[Try it online!](https://tio.run/##S85KzP3/PyfTytHKybraUTNYS0lfQcnJUVdLPd7IUcupWEdby89Rw8qxNl0pJkZfyUkr2On/f0MjAA "CJam – Try It Online")
Port of my Python answer
Explanation:
```
li            take input as integer
:A:B;         assign that to the variables A and B
{             start of while A loop
A)S*          push A-1 spaces
"/ "BA-*      push B-A strings of "/ "
'_2A*Bs,+*    push 2A + the number of digits _
N             push a newline
A(:A          decrement A
}g            end of while loop
"\\/"B*       push B \/
SB            push B after a space
```
[Answer]
# [Haskell](https://www.haskell.org/), 122 bytes
```
x%y=[1..x]>>y
f x|n<-read x=unlines[(n+1-i)%" "++i%"/ "++(n-i)%"__"++(x>>"_")|i<-[0..n-1]]++n%"\\/"++' ':x
main=interact f
```
[Try it online!](https://tio.run/##HYnRCoMgFEDf@wq5IBWi5etIf8REZDN2mbsP1cCgf3drT@dwzjNur5RzrYUfxmmlirf2aBZWTprkmuKDFfOhjJQ215HQEnsODIRADsPFjv4phMuLtRCgP3GSblSKpPZeCOIwz8Pvt6y9leYdkQzSntZ439lSqx6/ "Haskell – Try It Online")
I've deliberately constrained myself to standard I/O. See my comments on the question.
[Answer]
# [Vyxal](https://github.com/Vyxal/Vyxal) `So`, 30 bytes
```
ɾṘ›?ʀṪ‛/ *꘍?ɾd?L+\_*Ṙ+⁋,‛\/*$"
```
[Try it Online!](https://vyxal.pythonanywhere.com/#WyJTbyIsIiIsIsm+4bmY4oC6P8qA4bmq4oCbLyAq6piNP8m+ZD9MK1xcXyrhuZgr4oGLLOKAm1xcLyokXCIiLCIiLCI0Il0=)
This code's sorta backwards to reduce stack operations.
```
           ?ɾd                 # (1...input) * 2
              ?L+              # + log_10(input)
                 \_*           # That many underscores for each
                    Ṙ+         # Reverse that, and append to...
ɾṘ›                            # (2...input+1) reversed
          ꘍                    # For each, that many spaces appended to each of... 
   ?ʀṪ                         # 0...input-2
      ‛/ *                     # For each, that many copies of "/ "
                      ⁋,       # Print that, joined on newlines
                        ‛\/*   # Input * "\/"
                            $" # Paired with input
                               # (So flags) print that joined by a space
```
[Answer]
# [Perl 5](https://www.perl.org/), 96 bytes
```
sub f{$n=pop;join"\n",(map' 'x($x=1+$n-$_).'/ 'x$_.'_'x($x*2-2+length$n),0..$n-1),'\/'x$n." $n"}
```
[Try it online!](https://tio.run/##bZDLbsIwEEX38xWWZclJY2xCy4aQ/kF3XVqyihogFUysOEhUiG9P82hCHtib6zlnZiTbJD@tSyjdZUf2N4axzWz0k6VINVLhnb8sJ/zqsWscBgwXzPiSq6rCjOSmAS@rxSo4JXgojgx9sZSy8kJfcK0qDSUlDOm9vLiEfCau2Gw@sjwhRRVd/P4WwT7L6zXECY1MiFw4e0oLpVFjoMR2yyX3b@dfj6Vo/Vjp70AdIpunWFBmaotGqfP2LRfMCIqX8y7JSV2g/h0IMcaAViSEKjev@tRZkS6qNldafclrq/Zy19C39AX1qMD/czx1PLmZvu6mT1fMtk1XPhXUUwOGeC7AiE45jOEYw4QNKUzRA8KMdAzmoEWDTxt8X7gEWf4B "Perl 5 – Try It Online")
[Answer]
# [PHP](https://php.net/), 121 bytes
```
for($x=($i=$j=$argn)/10+1,$f=str_repeat;$i;$c.="/ ")printf("%{$i}s $c%s\n"," ",$f("_",2*$i--+$x));echo$f("\\/",$j)." $j";
```
[Try it online!](https://tio.run/##FYtLCsMgFACvIo8X0MZ87NZIdz2FEILERhcq6iJQevXadDOLGSYdqS2PdNHGTPFUFJ1Cr3DLr8AmMfeCo1Wl5jXvad@qRCfRjAomAixlF6ql0L3RfQpB0xUdgAOBa6KwAr/f0A1DjydjcjdH/Gutp6t7NgJBD7I1MX9jqi6G0obnDw "PHP – Try It Online")
This is not that great maybe, but I came with this.
[Answer]
# [Pyth](https://github.com/isaacg1/pyth), ~~54~~ 44 bytes
```
VQ+d++*-QNd*"/ "N*+*2-QNl+""Q"_";++*"\/"hNdQ
```
[Try it online!](https://tio.run/##K6gsyfj/PyxQO0VbW0s30C9FS0lfQclPS1vLCMjL0VZSClSKV7IGSirF6Ctl@KUE/v9vCgA "Pyth – Try It Online")
edit 1: Thanks @mathjunkie for saving 10 bytes!
[Answer]
# [Pip](https://github.com/dloscutoff/pip), 38 bytes
```
Fi,aP[sYsXa-i"/ "Xi'_Ma.y.y]"\/"Xa.s.a
```
[Try it online!](https://tio.run/##K8gs@P/fLVMnMSC6OLI4IlE3U0lfQSkiUz3eN1GvUq8yVilGXykiUa9YL/H///@GBgA "Pip – Try It Online")
### Explanation
This is one of those very rare occasions in Pip when a for loop seems to be the shortest solution.
```
Fi,aP[sYsXa-i"/ "Xi'_Ma.y.y]"\/"Xa.s.a
                                        s is space; a is 1st command-line arg (implicit)
Fi,a                                    For i in range(a):
    P                                    Print, with a newline
     [                     ]             the contents of this list, implicitly concatenated:
      s                                   A space
        sXa-i                             Space, repeated (a-i) times
       Y                                   also, yank that string into the y variable
             "/ "Xi                       "/ ", repeated (i) times
                      a.y.y               Concatenate a with y twice
                   '_M                     and replace each character with an underscore,
                                           giving a string of len(a) + 2 * (a-i) underscores
                            "\/"Xa      "\/", repeated (a) times
                                  .s    concatenated to space
                                    .a  concatenated to a
                                        Autoprint (implicit)
```
[Answer]
# [MAWP](https://esolangs.org/wiki/MAWP), 138 bytes
```
%@![1A~!~]%![!!!1M[84W;1A]%\A[95W2M;84W;1A]%2W1M3A{3M[29W1M5W;1A]25W;%1A}]~!!0/[25WP~1M~]%\1A3M[29W1M5W;1A]25W;%[99W25WM1M;95W2M;1A]%84W;:
```
Works as expected for single digit numbers, but beyond that, the last root will be longer than the others.
[Try it!](https://8dion8.github.io/MAWP/v1.1?code=%25%40!%5B1A%7E!%7E%5D%25!%5B!!!1M%5B84W%3B1A%5D%25%5CA%5B95W2M%3B84W%3B1A%5D%252W1M3A%7B3M%5B29W1M5W%3B1A%5D25W%3B%251A%7D%5D%7E!!0%2F%5B25WP%7E1M%7E%5D%25%5C1A3M%5B29W1M5W%3B1A%5D25W%3B%25%5B99W25WM1M%3B95W2M%3B1A%5D%2584W%3B%3A&input=5)
[Answer]
# [Scala](http://www.scala-lang.org/), 91 bytes
```
n=>print(n.to(1,-1).map{i=>" "*(i+1)+"/ "*(n-i)+"_"*(2*i+1)}:+("\\/"*n+" "+n)mkString "\n")
```
[Try it online!](https://tio.run/##HY6xCoMwGIT3PMWRKTFVSaGLVKFjh06lm1BSqyWt/oqGUhCfPY1O93EcdzdVpjW@f7zryuFiLKH@uZqeE07DgJmxr2nRZDiTQ17gRjaop7wYRktOUOJ6oXexlklnhtnmBQePhFVaKp6uSLENeA@0j1Z7yZTgZZnyiFTIKpLd5@pC2Qu8JC5904@CcIyh4XocZDgBNIJkkG20JbEl2cLY4v8 "Scala – Try It Online")
[Answer]
# [Husk](https://github.com/barbuz/Husk), 46 bytes
```
`:§+*"¦/"o:' s¹z+mR' ṫ¹m§+*" /"(:' R'_+L¹D≠¹)ŀ
```
[Try it online!](https://tio.run/##yygtzv7/P8Hq0HJtLaVDy/SV8q3UFYoP7azSzg1SV3i4c/WhnblgOQV9JQ2gVJB6vLbPoZ0ujzoXHNqpebTh////JgYA "Husk – Try It Online")
]