Search
JavaScript (Node.js), 78 bytes (m=(a,b=26,c=a(--b))=>b?[c,...m(a,b),c]:[c])=>m(a=>m(b=>(c=25-a-b)<0?32:c+65)) Try it online!
Japt -R, 14 13 bytes ;Bãê kb'A û ê Test it Takes all substrings of the alphabet, palindromizes them, and then takes only the ones starting with A and centers and mirrors that too. -1 byte tha...
Canvas, 10 7 6 bytes Z[]/┼┼ Try it here! Creates the top portion, centers it, and mirrors it. -3 bytes from dzaima's hint. -1, found the 6 byter! Explanation Z[]/++ Z push the al...
Stax, 12 bytes ç ∩<▬%▌ê▓jFo Run and debug it Same method as the Canvas answer.
You have an army of size $n$ that you need to split up to fight $k$ battles simultaneously against an opposing army $A$. In each battle, the army with the most troops present wins - no one wins a t...
C# 9, 38 bytes System.Console.Write("Hello, World!"); C# Version 9 introduced Top level statements.
QBASIC, 17, 16 bytes ?"Hello, World!" This should work on almost any BASIC interpreter. Thanks to manassehkatz, for the space.
Introduction The Pell(no, not Bell) Numbers are a simple, Fibonacci-like sequence, defined by the following relation: $P_n=\begin{cases}0&\mbox{if }n=0;\\1&\mbox{if }n=1;\\2P_{n-1}+P_{n-2...
JavaScript (Node.js), 150 71 bytes f=(a,b)=>a[b.length]?f(b,a):b.filter(x=>a[y=a.indexOf(x)]=!~y).length-1 Try it online!
APL (Dyalog Classic), 7 bytes ⎕+∘÷⍣=1 Well, rak is probably not going to answer this, so I might as well ;p Try it online!
Brachylog, 8 bytes pᵐ≠{b|}ᵛ Try it online! Since it takes $5!*5! = 14400$ tries to determine that the first test case gives false, I've added some shorter ones... pᵐ Permute each ele...
Scala, 55 bytes (Stream from 1 map 1.0./scanLeft.0)(_+_)indexWhere _.<= Try it online! Written in a more sane manner: n => Stream.from(1).map(1.0/_).scanLeft(0.0)(_+_).indexWhere(_ &g...
Scala (-language:postfixOps), 4 solutions 1. Just 256: 256 2. Casting a character: +'Ā' The character Ā is 256 in decimal, and the unary + turns it into an Int. 3. Hashcode of a string: ...
PowerShell, 4 solutions 99+99+9+9+9+9+9+9+4 355-33-33-33 16*16 [int][char]'Ā' Try it online!
BQN, 20 bytesSBCS ∾2/0‿8⊏↓"∾2/0‿8⊏↓""" Run online! BQN's strings escape double quotes by doubling them, so that the string used to start with only contains a single quote, although the output ...
Python 3, 34 bytes f=lambda x:[f(y)for y in range(x)] Try it online! -9 bytes thanks to Moshi Unfortunately, I cannot use Python sets, because sets are unhashable and thus cannot be put int...
APL (ngn/apl), 6 bytes {∇¨⍳⍵} Try it online! Dyalog APL and dzaima/APL appear to not give empty vectors for ⍳0, so I used ngn/APL. I don't know how to turn on boxing there, though, so there'...
BQN, 18 bytesSBCS {⊑(⊑𝕨⊸⍷)¨⊸/∾⟜𝕩¨↑𝕨} Run online! A direct translation of Razetime's APL solution (my attempted improvement ⊣∾{⊢´/𝕨⊸«⊸≡¨↑𝕩}↓⊢ turns out to be not at all correct). The BQN solut...
Sed -E, 25 bytes Takes second input, , comma, first input (inputs cannot contain , commas). s/^(.*)(.*),(.*)\1$/\3\2/
Scala 3 and Python 3.8 (pre-release), 2 languages (385 bytes) def String():Any=0 def Int():Any=0 def f(s:String):Any=print(s.replace(chr(81),chr(34)*3+s+chr(34)*3)) class M: f("""def Strin...
Programs may output via exit code Exit codes are to programs what return values are to functions, so it makes sense that exit codes would be allowed.
Abusing native number types It's common to restrict inputs, outputs, intermediate algorithm values, etc. to fit into the native number type of the language. This can be a problem for languages li...
Numerical I/O may be given as a character code Input 64 may be given as @ instead. This mostly exists for languages like Brainfuck that only take input through character codes.