Skip to main content
Share Your Experience: Take the 2024 Developer Survey
224 votes

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 ...
Dennis's user avatar
  • 210k
159 votes

How high can you count?

JavaScript (ES7), score 17, 176 bytes They said it couldn't be done, so I did it :D (thanks to a lot of help from @FullDecent) ...
ETHproductions's user avatar
142 votes
Accepted

Print 0 to 100 without 1-9 characters

R, 9 bytes F:volcano Try it online! The sequence operator : coerces its arguments to integers. ...
Robin Ryder's user avatar
  • 15.6k
122 votes

Golf a transcendental number

Python, 3 bytes min Try it online! Takes a number string, outputs its smallest digit as a smallest character. For example, ...
xnor's user avatar
  • 145k
100 votes
Accepted

The Versatile Integer Printer

30 languages, 248 bytes, \$\frac {248} {30^3} = 0.009185\$ ...
Sp3000's user avatar
  • 61.8k
94 votes

How high can you count?

Jelly, 47 integers, 519 bytes ...
Dennis's user avatar
  • 210k
93 votes

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. >&...
Sp3000's user avatar
  • 61.8k
79 votes

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 ...
Deadcode's user avatar
  • 11.6k
77 votes

Print numbers from 1 to 10

C, 36 bytes main(i){while(printf("%d ",i++)<3);} This works because the loop terminates after the first 2 digit number.
xsot's user avatar
  • 5,529
75 votes

The first n numbers without consecutive equal binary digits

Python 2, 36 bytes lambda n:[2**i*2/3for i in range(n)] Try it online! Explanation: The binary representation of \$\frac{2}3\$ is ...
Neil's user avatar
  • 171k
71 votes

Patience, young "Padovan"

Jelly, 10 bytes 9s3’Ẓæ*³FṀ Try it online! 1-indexed. Computes the largest element of: $$\begin{bmatrix}0&0&1 \\ 1&0&1 \\ 0&1&0\end{...
lynn's user avatar
  • 68.7k
70 votes

It was just a bug

Python 2, 59 57 56 55 bytes i=8;exec"print(' '*abs(i)).join('1234567890');i-=1;"*17 Try it online! @Leaky Nun helped golfing this a lot, @Praind ...
Mr. Xcoder's user avatar
  • 42.4k
66 votes

How high can you count?

brainfuck, score 2, 255 144 10 bytes ...Yeah, not the best idea since I only have 8 characters (tarpits gonna tarpit) to work with but let's see how much is possible. I think this is all that's ...
totallyhuman's user avatar
  • 17.2k
62 votes

Increment The Time

Microsoft Excel, 9 bytes =A1+"0:1" Input is in cell A1. Tested on my Mac (Excel for Mac version 16.53) and online at ...
Dominic van Essen's user avatar
60 votes

Print numbers from 1 to 10

HTML, 44 bytes <ol><li><li><li><li><li><li><li><li><li><li> This is longer than ...
NinjaBearMonkey's user avatar
58 votes

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 ...
Wheat Wizard's user avatar
  • 98.8k
54 votes

Count all possible Tweets

Emotion, 17 bytes 😍😃💁🧟🤯😃😧😍😄🤶🙆🙆😬🏃🧛😧🤠 Explanation ...
Quantum64's user avatar
  • 1,051
53 votes

Is this number a prime?

Hexagony, 28 bytes Since Etoplay absolutely trounced me on this question, I felt that I had to outgolf his only other answer. ...
H.PWiz's user avatar
  • 11.6k
51 votes

Print all integers

Haskell, 19 bytes do n<-[1..];[1-n,n] Produces the infinite list [0,1,-1,2,-2,3,-3,4,-4,5,-5,6,-6,7,-7... Haskell allows ...
xnor's user avatar
  • 145k
51 votes

Output the sign

Retina, 9 bytes [1-9].* 1 Try it online! Replaces a non-zero digit and everything after it with 1. This leaves a potential ...
Martin Ender's user avatar
51 votes

Sum of all integers from 1 to n

Pyth, 2 bytes sS Try it online! Implicit input. S is 1-indexed range, and s is the sum.
Jim's user avatar
  • 1,522
50 votes

As Easy as One-Two-Three

Python, 24 bytes range(123,790,111).count An anonymous function that outputs 0 or 1. It creates the list ...
xnor's user avatar
  • 145k
50 votes

Show me the nearest demon

Python 2, 28 bytes lambda n:'6'*len(`-~n*3/11`)
orlp's user avatar
  • 39.1k
49 votes

Compute the Carmichael function

Mathematica, 16 bytes CarmichaelLambda Well...
Martin Ender's user avatar
48 votes

Print numbers from 1 to 10

Bash, 12 characters echo {1..10} Sample run: bash-4.3$ echo {1..10} 1 2 3 4 5 6 7 8 9 10 Bash + coreutils, 10 characters (...
manatwork's user avatar
  • 20.2k
48 votes

Reciprocal of a number (1/x)

Python 2, 10 bytes 1..__div__ Try it online!
Dennis's user avatar
  • 210k
46 votes

Scroll Word's font size selector

Word VBA, 199 147 126 116 102 100 87 85 Bytes Why emulate when you can do?! Declared function in the ThisDocument module that takes input ...
Taylor Raine's user avatar
  • 8,426
45 votes

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 ...
xnor's user avatar
  • 145k
45 votes

Implement Malbolge's "crazy" operator

C (gcc), 99 98 96 bytes Saved a byte thanks to ceilingcat; golfing 19683 to L'䳣'. Saved two bytes; golfing ...
Jonathan Frech's user avatar
44 votes

Output the sign

C (GCC), 24 23 22 18 bytes Thanks to @aross and @Steadybox for saving a byte! f(n){n=!!n|n>>31;} Not guaranteed to work on all systems or compilers, works on ...
betseg's user avatar
  • 8,733

Only top scored, non community-wiki answers of a minimum length are eligible