Search
JavaScript (Node.js), 47 40 50 49 bytes -1 (possibly -3) bytes thanks to Shaggy! f=(n,s='0')=>n?f(n/3+n%3/2|0,'')+"+-0+-"[n%3+2]:s Try it online! A basic recursive solution.
Haskell, 78 77 bytes (g[0]!) g a=mapM(\_->[-1..1])a++g(0:a) (a:b)!c|foldl1((+).(*3))a==c=a|0<1=b!c Try it online!
Python 3, 64 bytes def f(n): for i in range(n):print((' '*(n-i)+'_/'+'##'*i)[3:]) Try it online!
Combine conditionals Python has its fair share of comparison operators and can actually be used in a single conditional. For example: x == 2 and y == 2 can be: x==y==2 Used on Make $2 + 2 ...
Japt, 10 bytes `HÁM, {U}! Try it The backtick decompresses a compressed string, the {} is Japt's string interpolation and U is the first input variable.
JavaScript (Browser), 670 bytes for(_="=1,w=):=0,w(=f(||(.join`w?q-w?q=-w(a,b=>A(L*5,a),g.innerText=N=L=D=T,I=,c,d)a-d?I,b(d,cd+1c,A=)I(a,(x,y)[...y,b(x)],[](U=_(Kf=({value:a})a==[a|]+[]&&a...
Jelly, 1 byte ḅ Try it online! Essentially just Razetime's APL answer, except in that ḅ vectorizes rather than carrying out mixed base conversion--irrelevant if, as is the case here, the provi...
Python 3, 101, 98, 94 bytes First answer! lambda s:f"{(('FCGDAEB'.index(s[0])-~-ord(s[5])*('-'in s)-3*('i'in s)-6)%12)+1}"+'BA'['i'in s] Try it online! Readable version: def f(s): n="FCG...
V (vim), 11 bytes ÀñY>HGpé/Á\ Try it online! Hexdump: 00000000: c380 fe58 c3b1 593e 4847 70c3 a92f c381 ...X..Y>HGp../.. 00000010: 5cc3 bfc3 \...
LOLCODE, 37 bytes HAI 1 VISIBLE "Hello, World!" KTHXBYE Try it online!
05AB1E, 7 bytes ”Ÿ™,‚ï! Try it online!
SE Sandbox Link, Codidact Sandbox Link Inspired by this video. Given a positive integer, draw its Cistercian representation as ascii art. The Challenge Cistercian numerals are a decimal-based...
Shakespeare Programming Language, 11232 bytes My last attempt was nearing the 20000 byte zone, because it didn't use the stack at all. a.Ajax,.Puck,.Ford,.Act I:.Scene I:.[Enter Ajax and Puck]Aja...
Given a musical key, output its number and letter on the Camelot Wheel (shown below). Input A musical key as a string, as shown on the wheel. The words "Sharp" and "Flat" may be replaced with s...
Perl 5 -p, 10 bytes $_=reverse Try it online!
C (gcc), 32 bytes f(a,b){return a>0?f(b,a-b)+1:0;} Try it online!
Japt, 4 bytes P1 is: +"+U Try it Which outputs P2, where N1 is the input from P1: N1+U Try it
Vyxal Ṫ, 3 bytes ?\? Try it Online! Outputs N1?, which when run with the same flag as P1, will add the two inputs together. Try it Online!
Japt, 3 bytes ÆßX Try it online! (don't mind the -Q This is Shaggy's solution. ÆßX Æ Make a range [0, input) and map each number X: ß Run this program again on X Japt, 11 8 bytes ...
Empty answers to questions requiring an interpreter In particular, "simulating" a machine on this very machine by accepting the initial state as the simulation's initial state and returning t...
Free as in usable on a free platform "free" meaning there must be a downloadable interpreter available for the language which can run the program with the required features, on an online/offline s...
Ruby, 56 bytes ->s,i{a=[*?a..?z].rotate(i)*"";s.tr "A-Za-z",a.upcase+a} Try it online! tr is wildly useful here. Builds the tr string manually and replaces only the alphabets.