Search
Scala, 25 bytes a=>_.flatMap(a map _.min) Try it in Scastie! Pretty trivial solution, but here's a bad explanation anyway: //a is the first string a =>_.flatMap(a map _.min) //b is th...
Sclipting, (UTF-16) 80 bytes 갰減먩놔 먩놦①復먩놗겮꺕똀 먩놬①復①增疊먩놣겮꺕똀會먩놣겮꺕떠 먩놩⑴復먩놝 Explanation Input n pushed on stack 갰減 Subtract 3 먩놔 "╔" 먩놦 "╦" ①復 String of above repeat...
Jelly, 4 bytes X}€S Try it online! How it works X}€S - Main link. Takes n on the left, m on the right € - Over each element of 1 through n: } - With m as its argument: X - Y...
Vyxal ṪR, 3 bytes (⁰℅ Try it Online! ( # N times... ℅ # Generate a random integer between one and... ⁰ # First argument
Japt -mx, 3 bytes Takes n as the first input and m as the second. ÒVö Try it ÒVö :Implicit map of the range [0,first input) Ò :Negate the bitwise NOT of (i.e., increment) V ...
Haskell, 25 bytes f a=(>>= \c->map(min c)a) Try it online!
Python 3, 47 42 40 bytes -2 bytes thanks to bastolski lambda n:'#'*n+('\n#'+' '*(n-2)+'#')*~-n Try it online! Python's string multiplication is really useful.
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!