Share Your Experience: Take the 2024 Developer Survey

# Tag Info

### Hyperprogramming: N+N, N×N, N^N all in one

Jelly, 12 bytes N+N “(ẹ+)‘FQṖṪỌv Try it online! N×N ““((ẹẹ++))‘‘FFQQṖṖṪṪỌỌvv Try it online! N^N ...
• 210k

### Is this even or odd?

ArnoldC, 299 283 bytes ...
• 105k

### 1, 2, Fizz, 4, Buzz

Hexagony, 91 bytes Thanks for the bounty :) Wow, I would never have imagined I could beat Martin’s Hexagony solution. But—who would have thunk it—I got it done. After several days of failure because ...
• 3,265

### Hyperprogramming: N+N, N×N, N^N all in one

><>, 41 bytes \< 1:: : &&* + i*n n c& %: 4l 0( .i n} &? Try it online: N+N, N*N, N^N. Assumes that the STDIN input is exactly one char. >&...
• 61.8k

Minecraft 1.10, 221 characters (non-competing) See, this is what we have to deal with when we make Minecraft maps. Aside: There's no way to take a string input in Minecraft, so I'm cheating a bit by ...
• 1,499

### Shift right by half a bit

Regex (ECMAScript+(?*)), 1169 929 887 853 849 708 bytes -141 bytes by using the second form of shortened division, where $A^2 > C$ Regex was never designed to ...
• 11.6k

### What do you get when you multiply 6 by 9? (42)

Mathematica, 15 bytes Byte count assumes Windows ANSI encoding (CP-1252). 6±9=42 ±n__:=1n Defines a binary operator ± which ...
• 197k

Mathematica, 46 bytes {1,4^8}.Fold[##+{0,#&@@#}&,{1,0},#]~Mod~65521& An anonymous function that takes an integer array and returns the Adler-32, with ...
• 789

### What do you get when you multiply 6 by 9? (42)

Haskell, 14 bytes 6&9=42 a&b=a*b Try it online!
• 39.7k

### Reciprocal of a number (1/x)

Brain-Flak, 772 536 530 482 480 + 1 = 481 bytes Since Brain-Flak does not support floating point numbers I had to use the -c flag in order input and output with ...
• 98.8k

### Evaluate the aspect ratio of a triangle

Jelly, 7 bytes SH_÷@HP Try it online! Explanation Let’s read this chain: The implicit argument is a list [a, b, c]. First ...
• 68.7k
Accepted

Jelly, 1 byte + Try it online! Also works in 05AB1E, Actually, APL, BQN, Brachylog, Braingolf, Chocolate, ,,, (Commata), dc, Deorst, Factor, Fig**, Forth, Halfwit*,...
• 210k

### Is this even or odd?

brainfuck, 8 bytes +[,>,]<. Input is in unary. Output is the 1 (truthy) for odd numbers and NUL (falsy) for even numbers. Try it online! How it works We ...
• 210k

### Show me the nearest demon

Python 2, 28 bytes lambda n:'6'*len(-~n*3/11)
• 39.1k

### Reciprocal of a number (1/x)

Python 2, 10 bytes 1..__div__ Try it online!
• 210k

Binary lambda calculus, 4.125 bytes Input and output as Church numerals. 00000000 01011111 01100101 11101101 0 In lambda calculus, it is λm. λn. λf. λx. m f (n ...
• 49.7k

### Abandon all squares, ye who divide me

05AB1E, 2 bytes fP Try it online! How it works ...
• 210k

### If A-B be in A-B A else B eh?

Python, 27 bytes lambda a,b:[a,b][2*b*b>a*b] Try it online! An arithmetic formula. Why is the negation of 2*b*b>a*b ...
• 145k

### Moving modest minimum

Python 2, 41 bytes lambda l:[sorted(l)[x==min(l)]for x in l] Try it online! For each element x we check whether ...
• 145k

### Yes, of course I'm an adult!

Python 2.7, 34 bytes lambda x:max(x,[18,1.4]['.'inx])
• 68.7k

### Random point on a sphere

Wolfram Language (Mathematica), 20 bytes RandomPoint@Sphere[] Try it online! Does exactly what it says on the tin.
• 20.6k

Python 2, 98 97 91 84 bytes s=input();L=1 for _ ins*8:s+=1098*int(str(s).translate('0011'*64));L*=10 print s%L This does I/O in decimal. The integers have to ...
• 210k

### Is it a sum-free set?

Python 2, 41 bytes lambda s:s==s-{a+b for a in s for b in s} s should be a Python set. Fun fact: ...
• 31.4k

### Divisibility test

Jelly, 1 byte This took me hours to golf. Try it online!
• 59.2k

### Notcalc (Calculate the wrong answer)

RProgN, 4 3 1 Byte Crossed out 4 is still 4 ;( E The most simple of solutions, compares if A and B are equal. Pushes true, which RProgN sees as 1, if they are the ...
• 10.8k

### Is this even or odd?

Mathematica, 4 bytes OddQ Gives True for odd inputs and False for even inputs, who knew? ...
• 197k
Accepted

### Greatest Common Divisor

Retina, 16 ^(.+)\1* \1+1 This doesn't use Euclid's algorithm at all - instead it finds the GCD using regex matching groups. Try it online. - This example ...
Retina, 99 91 bytes 1\.|$8$*; +;(;*)(\d) $2$1 \d+ $*1,10000000$* (1+),(\1)+1* $#2 +(\d)(;+);$2\$1 1; . ; 0 Try it online! Woohoo, sub-100! This is ...