Search
Vyxal, 13 bytes \#*,‹(⇩\#꘍ṘǏ, Try it Online! \#*, # Print a line of # ‹( # n-1 times... ⇩\#꘍Ṙ # n-2 spaces before a hash Ǐ, # Append a hash and print
Ruby, 53 bytes ->n{n-=3;[?╔+?╦*n+?╗,*[?╠+?╬*n+?╣]*(n+1),?╚+?╩*n+?╝]} Try it online!
Japt -R, 11 10 bytes ÆQ+ùUÉÃvçQ Try it ÆQ+ùUÉÃvçQ :Implicit input of integer U Æ :Map the range [0,U) Q : Quotation mark + : Append another ...
JavaScript, 47 bytes n=>`0`.repeat(n)+(` 0`.padEnd(n--)+0).repeat(n) Try it online! My first pass used recursion before I realised I was over thinking things! First 51 byte version inclu...
JavaScript, 19 bytes x=>y=>x-2|y-2?x+y:5 Try it online!
Rockstar, 82 bytes listen to N let N be-2 X's-1 say "##"+"#"*N while N-X say "#"+" "*N+"#" let X be+1 Try it (code will need to be pasted in)
C (gcc), 33 31 bytes f(x,y){return x+y+(x==2&y==2);} Try it online! Saved two bytes thanks to Shaggy
Husk, 7 bytes +±Λ=2¹Σ Try it online! Input as a list.
Ruby, 23 bytes ->a,b{a==2&&b==2?5:a+b} Try it online!
Turing Machine.io, 202 bytes 0 1 101 3 1 2 0 0 2 108 3 1 3 0 0 3 108 3 1 4 0 0 4 111 3 1 5 0 0 5 44 3 1 6 0 0 6 32 3 1 7 0 0 7 87 3 1 8 0 0 8 111 3 1 9 0 0 9 114 3 1 a 0 0 a 108 3 1 b 0 ...
Japt, 1 byte ¤ Try it or run all test cases
JavaScript, 16 bytes n=>n.toString(2) Try it online!
Sclipting, (UTF-16) 14 bytes 要감啃終丟併反 Explanation: Push input 要 While the top number is non-zero 감啃 Shift the top number by 1 bit and push both the bit and shifted result 終 End lo...
C (gcc), 50 bytes f(int(*o)(i,j),int n){return n-1?o(f(o,n-1),n):1;} Try it online!
Haskell, 29 bytes import Text.Printf printf"%b" Try it online! Without builtins: Haskell, 37 bytes f n|n<2=[n]|0<1=f(div n 2)++[rem n 2] Try it online!
Python 3, 3 bytes bin Try it online!
JavaScript (Node.js), 52 bytes (A,...c)=>A.sort((a,b)=>c.map(z=>z(a,b)).find(x=>x)) Try it online! A golf of the reference code. If we can assume there will be no ties, 47 is po...
Ruby, 11 bytes ->n{"%b"%n} Simple string formatting. Try it online!
Haskell, 29 bytes import Data.List foldr sortBy Try it online!
JavaScript, 25 bytes Arguments are curried, i.e. f(a)(s), where a is the array to be sorted and s is an array of functions to sort by, in reverse order. Modifies a in place, which I don't know tha...
Japt -h, 5 bytes Takes the array to be sorted as input and assigns the array of functions, in reverse order, to variable V. V£=ñX Try the names test case I could save a byte by replacing =ñ w...
Rockstar, 138 135 133 bytes F takes I&S let M be N/I turn up M if N-I*M S's"" return S N's0 while N-100 let N be+1 say F taking 3,"Fizz"+F taking 5,"Buzz" or N Try it here (Cod...
Just curious, but this might help other users, so I'm placing at Meta. A popularity-contest is a non-object winning criteria challenge that is based on having the highest scored answer of the chal...