[Question]
  [
Your work is to recreate this piece of art:
```
                        _____
                       |
                       |
                       |
                       |
                  _____| 
                 |
                 |
                 |
                 |
            _____|
           |
           |
           |
           |
      _____|
     |
     |
     |
     |
_____|
```
The answer must recreate this and print this as a result. All languages allowed, no direct printing of art, ofc, some level of manipulation is required. The answer with the least bytes wins.
*Closes on Thursday 6:30 AM UTC or so.*
The original thing was shown to me by my friend who did this with Java, he refused to show me the source code and now I'll dazzle him with the brilliance of other languages possibly. :D
**You cannot use any alternative character** *(makes it easier?).*
---
**Current leader board**
1. *Pyth* - 28 bytes - isaacg
2. *CJam* - 30 bytes - Runer112
3. *CJam* - 32 bytes - Martin Büttner
**Highest votes:** *C* - 73 bytes - Paul R
---
isaacg takes the crown for passing the Staircase Challenge with Pyth. Watch out for more challenges like these on PPCG!
  
[Answer]
# C, ~~86~~ ~~80~~ ~~76~~ ~~75~~ 73 bytes
```
c;main(i){for(i=21;i--;c='|')printf("%*s%c\n",i/5*6+5,i%5?"":"_____",c);}
```
[Answer]
# Java, ~~198~~ ~~158~~ ~~156~~ 146 bytes
This can probably be shortened a lot. As usual, suggestions are welcome.
```
void a(){String a="",b="_____",c=b;for(int i=-1;i<20;b=i%5<1?b.replace(c,"     "):i%5>3?b+" "+c:b)a=b+(++i>19?"":"|")+"\n"+a;System.out.print(a);}
```
Indented (kinda):
```
void a(){
    String a="",b="_____",c=b;
    for(int i=-1;i<20;b=i%5<1?b.replace(c,"     "):i%5>3?b+" "+c:b)
        a=b+(++i>19?"":"|")+"\n"+a;
    System.out.print(a);
}
```
Thanks Martin Büttner, Rainbolt, and Geobits.
[Answer]
**Brainfuck (1065 Bytes)**
It's not pretty, it's not short...but i'll optimize later on!
```
++++[->++++++++<]>........................
[->+++<]>-.....>++++++++++.[->+++<]>++....
...................-[->++++<]>.>++++++++++
.[->+++<]>++.......................-[->+++
+<]>.>++++++++++.[->+++<]>++..............
.........-[->++++<]>.>++++++++++.[->+++<]>
++.......................-[->++++<]>.>++++
++++++.[->+++<]>++..................[->+++
<]>-.....[->++++<]>.>++++++++++.[->+++<]>+
+.................-[->++++<]>.>++++++++++.
[->+++<]>++.................-[->++++<]>.>+
+++++++++.[->+++<]>++.................-[->
++++<]>.>++++++++++.[->+++<]>++...........
......-[->++++<]>.>++++++++++.[->+++<]>++.
...........[->+++<]>-.....[->++++<]>.>++++
++++++.[->+++<]>++...........-[->++++<]>.>
++++++++++.[->+++<]>++...........-[->++++<
]>.>++++++++++.[->+++<]>++...........-[->+
+++<]>.>++++++++++.[->+++<]>++...........-
[->++++<]>.>++++++++++.[->+++<]>++......[-
>+++<]>-.....[->++++<]>.>++++++++++.[->+++
<]>++.....-[->++++<]>.>++++++++++.[->+++<]
>++.....-[->++++<]>.>++++++++++.[->+++<]>+
+.....-[->++++<]>.>++++++++++.[->+++<]>++.
....-[->++++<]>.>++++++++++.[--->++<]>+++.
....[->++++<]>.
```
[Answer]
# CJam, ~~36~~ 30 bytes
[Try it online.](http://cjam.aditsu.net/#code=L%7B%7BS5*%5C%2B%7D%2FS'%7C5*%2B%5D'_5*%2B%7D5*1%3EzN*)
```
L{{S5*\+}/S'|5*+]'_5*+}5*1>zN*
```
My initial 36-byte solution generated the result in the output orientation. Despite my attempts to squeeze more bytes out of the algorithm, I couldn't. Then I saw [Martin's brilliant strategy](https://codegolf.stackexchange.com/a/47245/18144) of generating *columns* instead of rows and transposing the result. I realized that was probably a better approach, so I set off to create a transposition-based solution.
However, my approach to implementing that strategy varies quite a bit. Instead of generating full columns, I use an iterative solution that indents any already-generated "steps" and adds adds a new step at each iteration. So the first iteration of the main loop generates this:
```
 |||||
_
_
_
_
_
```
The second iteration of the main loop indents the existing step and adds a new one after it:
```
      |||||
     _
     _
     _
     _
     _
 |||||
_
_
_
_
_
```
And the full five iterations of the main loop generate this:
```
                     |||||
                    _
                    _
                    _
                    _
                    _
                |||||
               _
               _
               _
               _
               _
           |||||
          _
          _
          _
          _
          _
      |||||
     _
     _
     _
     _
     _
 |||||
_
_
_
_
_
```
After this, all that needs to be done is eliminate the first line, which would otherwise become the unwanted riser for the bottom step, and transpose.
[Answer]
# Python 2, ~~80~~ ~~77~~ 74 bytes
```
n=24;exec"print' '*n+'_'*5+'|'*(n<24)+('\\n'+~-n*' '+'|')*4*(n>0);n-=6;"*5
```
Got rid of the double `exec` and fit everything into the one `print`!
[Answer]
# [Clip, 46](http://esolangs.org/wiki/Clip)
```
{:24S:5'_m[z{*4,:+5*6zS"|
":*6zS:5'_"|
"`}vR4`
```
## Explanation
```
{               .- Put everything in a list -.
 :24S           .- 24 spaces                -.
 :5'_           .- 5 underscores            -.
 m[z            .- Map...                   -.
    {           .- A list                   -.
     *4         .- 4 of the following       -.
       ,        .- Append                   -.
        :+5*6zS .- 5 + 6 * the iteration of spaces  -.
        "|      .- A pipe and newline       -.
"
     :*6zS      .- 6 * the iteration of spaces      -.
     :5'_       .- 5 underscores            -.
     "|         .- A pipe and newline       -.
"
    `           .- End list (per iteration  -.
   }vR4         .- The mapping is onto {3,2,1,0}    -.
```
[Answer]
# CJam, ~~36~~ 32 bytes
```
{5*S*'_+a5*~_W<S+5'|*+}5/;]W%zN*
```
[Test it here.](http://cjam.aditsu.net/#code=%7B5*S*'_%2Ba5*~_W%3CS%2B5'%7C*%2B%7D5%2F%3B%5DW%25zN*)
I also tried using an explicit formula, but it's longer in CJam... maybe it helps someone else:
```
21,29,ff{_2$5/)6*(=@@6/5*=_++" |_|"=}W%N*
```
## Explanation
I found that the staircase can be built much more easily if you a) transpose the grid and b) reverse the lines:
```
_
_
_
_
_
 |||||
     _
     _
     _
     _
     _
      |||||
          _
          _
          _
          _
          _
           |||||
               _
               _
               _
               _
               _
                |||||
                    _
                    _
                    _
                    _
                    _
```
So first I'm building that, then reverse, then transpose.
```
{                     }5/        "For i in [0 .. 4].";
 5*S*'_+                         "Get a string of 5*i spaces and append _.";
        a5*~                     "Get five such lines.";
            _W<S+                "Duplicate the last, remove the _, add a space.";
                 5'|*+           "Add 5 copies of |.";
                         ;       "The above creates a row too many, so discard the last one.";
                          ]W%zN* "Wrap everything in an array, reverse, transpose, riffle
                                  with newlines.";
```
[Answer]
# Python 2, 59
```
n=21
exec"n-=1;print n/5*6*' '+' _'[n%5<1]*5+'|'*(n<20);"*n
```
The 21 lines are indexed by `n` in `[20,19,...,1,0]`. First prints 6 spaces for each "step" we're up (minus 1), computed as `n/5*6`. Then, prints five spaces, except these are instead underscores for multiples of five. Finally, prints a vertical line, except for the top line `n=20`.
[Answer]
# JavaScript, ~~115~~ ~~107~~ ~~96~~ ~~94~~ ~~89~~ ~~87~~ 83 bytes
This is too long to win, but it's the first time I've come up with an answer on PCG.SE, and I'm kind of proud to have made something postable.
With some helpful syntactical advice I shortened the code significantly - even below the scrollbar threshold!
```
for(s='',y=22;--y;s+='\n')for(x=0;++x<29;)s+=6*~(~-y/5)-~x?4+5*~(x/6)+y?' ':'_':'|'
```
[Answer]
# ECMAScript 6, ~~142~~ ~~138~~ ~~129~~ 91 bytes
Special thanks to @edc65 for really reworking this.
```
a=o='',[for(x of!0+o)(o=(a+'     |\n').repeat(4)+a+'_____|\n'+o,a+='      ')],a+'_____\n'+o
```
```
out.value=(a=o='',[for(x of!0+o)(o=(a+'     |\n').repeat(4)+a+'_____|\n'+o,a+='      ')],a+'_____\n'+o)
```
```
textarea{
  width:300px;
  height:400px;
}
```
```
<textarea id="out";></textarea>
```
The logic of the original version check @edc65 comment for how it morphed.
```
((f,l,p)=>                  //variables
f(24)+l+p[1]+               //add the non pattern line
[0,1,2,3].map(b=>f(18-6*b)) //add the right number of spaces in front of the 4 steps
.map((a,b)=>f(4,a+f(5)+p)   //the four repeating lines of the step 
+a+l)                       //the landing line
.join(p)+p)                 //put it all together
((n,s=' ')=>s.repeat(n)     //create an variable array of some character
,'_____','|\n')             //string literals
```
[Answer]
# MATLAB, 68 bytes
I have the strong feeling MATLAB should be able to do better, but I can't think of a way.
```
p(1:5,6)='|';p(1,1:5)=95;w=blkdiag(p,p,p,p);w(21,25:29)=95;flipud(w)
```
Creates the stairs upside-down and flips it. My thaumometer broke because of all the magic constants around.
`'|'` is intentionally left as-is (instead of ascii codepoint) to initialize `p` and `w` as a char array.
[Answer]
# Ruby, 48
```
25.times{|i|puts" "*(4-i/6)*5+(i%6==0??_*5:?|)}
```
## Old approach, 68
```
4.times{|i|(?_*5+"
|"*5).each_line{|l|puts" "*(4-i)*5+l}}
puts"_"*5
```
[Answer]
# Pyth, ~~29~~ 28
```
V21++**6/-20N5d*5?d%N5\_<\|N
```
[Try it here.](https://pyth.herokuapp.com/)
A pretty straightforward solution, with the "append five spaces or five underscores" trick from @xnor's solution, but with the loop from 0 to 20, not 20 to 0.
[Answer]
# Julia, 83 bytes
```
for n=24:-6:0 print(" "^n*"_"^5*"|"^(n<24)*"\n"*(" "^(n>0?n-1:0)*"|\n"^(n>0))^4)end
```
In Julia, string concatenation is performed using the `*` operator and string repetition is performed using `^`.
[Answer]
# [><>](http://esolangs.org/wiki/Fish), ~~108~~ ~~104~~ 100 bytes
```
cc+::?v~'_____'o\/' 'o  \
?:o'|'\' 'o1-30.o\v!?:-1<}:{oav!?:<4;!
-20.12^?(+cc:ooo/ \~1-'!|'o1. \~ao6
```
A simple ><> solution, using the same strategy as my [Python answer](https://codegolf.stackexchange.com/a/47254/21487). The main difference is that ><> doesn't have string multiplication (or even strings), so all of that is done with loops.
## Explanation
```
cc+                  Push 24 (call this "n")
[outer loop]
[loop 1, print n spaces]
:                    Copy n (call this "i")
:?                   If i is not zero...
' 'o1-30.                Print space, decrement i and go to start of loop 1
~'_____'ooooo        Pop i and print five underscores
:cc+(?               If n < 24...
'|'o                     Print a pipe
21.                  Otherwise skip pipe printing
[loop 2: print vertical parts of stairs]
?!;                  If n is zero, halt
4                    Push 4 (call this "j")
?!                   If j is zero...
~ao6-20.                 Pop j, print a newline, minus 6 from n and go to start of outer loop
ao                   Print a newline
}:{                  Copy n (call this "k")
[loop 3: print n-1 spaces]
1-                   Decrement k
:?!                  If k is zero...
    ~1-'!|'o1.           Pop k, decrement j, print a pipe and go to start of loop 2
' 'o                 Otherwise print a space and go to start of loop 3
```
[Answer]
# Perl, 50
```
#!perl -l
print$"x6x(-$_/5),($_%5?$":_)x5,"|"x$|++for-20..0
```
Try [me](http://ideone.com/61qMXw).
[Answer]
# T-SQL, 276 bytes
```
declare @x int declare @y int declare @w varchar(30) declare @l char(5) set @l='_____' set @x=23 while @x > 4 begin set @w=replicate(' ',@x) set @y=0 if @x=23 print @w+' '+@l else print @w+' '+@l+'|' while @y < 4 begin set @y=1+@y print @w+'|' end set @x=@x-6 end print @l+'|'
```
[Answer]
# Visual FoxPro 9.0, 261 bytes
### n = Number of Steps
total of 175 characters, but had to output to file to display correctly - so minus 43 chars for file operations = 132 chars.
```
n=10
c=CHR(13)
f="st.t"
ERAS (f)    
FOR i=n TO 1 STEP -1
    p=(i-1)*6
    =STRTO(PADL("_____",p+5)+IIF(i<n,"|","")+c+IIF(i>1,REPLI(PADL("|"+c,p+1),4),""),f,.t.)
    ?PADL("_____",p+5)+IIF(i<n,"|","")+c+IIF(i>1,REPLI(PADL("|"+c,p+1),4),"")
ENDFOR
MODI COMM (f)
```
**Note to answerer:** Byte count is for the absolute working source code, and the byte counter says that it's 261 bytes, so it is.
[Answer]
# Bash (+tac from coreutils): 110 bytes
This can be pasted directly into the terminal.
```
(n=;set {1..4};for i do echo "${n}_____|";n+='     ';for i do echo "$n|";done;n+=\ ;done;echo "${n}_____")|tac
```
]