Skip to main content
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
213 votes

Hello, World! (Every other character)

Python 3, 61 bytes rant="partisn't" print(("HHeelllloo,, WWoorrlldd!!"""[::2])) Try it online! Abusing the fact that print ...
vroomfondel's user avatar
  • 2,264
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.9k
73 votes

What did we forget?

zsh, 603 594 566 561 548 440 415 399 378 370 bytes ...
Doorknob's user avatar
  • 71.5k
62 votes

Hello, World! (Every other character)

Cardinal, 29 bytes % " H e l l o , W o r l d ! Try it online! Removing every other character removes all the linefeeds, which still results in ...
Martin Ender's user avatar
59 votes

From Programming Puzzles to Code Golf

Python 2, 48 47 bytes -1 byte thanks to Erik the Outgolfer print' 'and'Programming Puzzles'or'Code\40Golf' Try it online! ...
Rod's user avatar
  • 18.4k
54 votes

I reverse the source code, you negate the output!

05AB1E, 2 bytes (1 Try it online! !enilno ti yrT ( # negate nothing 1 # push 1 (and implictly output it) <...
Grimmy's user avatar
  • 15.7k
52 votes

Hello, World! (Every other character)

C, 125 bytes xpxuxtxs( ) { }xuxs ( ) { } main( ) {puts ( "Hello, World!" ) ; } mxaxixn ( ) {xpxuxtxs ( " H e l l o , W o r l d ! " ) ; } Try it online! With ...
Steadybox's user avatar
  • 16.5k
47 votes

I uppercase the source code, you reverse the input!

05AB1E, 1 byte r Try it online lowercase or uppercase! Finally a question which I (a dumb brain) can answer! Thanks for this easy, yet fun challenge! (I do feel ...
SunnyMoon's user avatar
  • 2,699
42 votes

What are the five most powerful characters in your language?

Python3, 21 27 values Characters: 3479% Unique numbers: [1,2,3,4,5,6,7,8,9,11,12,19,20,21,24,29,34,35,36,37,39,43,46,47,49,73,74]...
Yytsi's user avatar
  • 3,762
42 votes

I uppercase the source code, you reverse the input!

Python 3,  61 50 49  48 bytes -1 thanks to benrg! r=-1;ʳ=1;ᵖʳᵢⁿᵗ(ᵢⁿᵖᵘᵗ()[::r]) lower-cased / upper-cased This works because PEP-3131 was implemented in Python 3....
Jonathan Allan's user avatar
41 votes

Code 3k to Codee k

Mathematica, 2 bytes 4! 4! returns 24 4!! returns 8
ZaMoC's user avatar
  • 24.9k
41 votes
Accepted

Create a square of increasing size by replicating the initial code

Pyth, 2 bytes 5 Try it online! Also Try it doubled, tripled! How does that work? \n is the command that prints its ...
Mr. Xcoder's user avatar
  • 42.4k
38 votes
Accepted

Coding Around The Clock

GolfScript, 11 10 bytes 21;;3#9];6 Uses # as padding character. 12 o'clock ...
Dennis's user avatar
  • 210k
38 votes

Letter, Number, Symbol, Space, Repeat

Haskell 300 bytes This code should have no trailing newline. The function m1 takes the input as a Char and returns the answer ...
Ørjan Johansen's user avatar
38 votes

Powerprogramming: O(1^N), O(N^1), O(2^N), O(N^2) all in one

Python 3, 102 bytes try:l=eval(input());k=1#)]0[*k**l(tnirp except:k=2#2=k:tpecxe print(k**l*[0])#1=k;))(tupni(lave=l:yrt Try it online! This is of O(1^n), ...
Leaky Nun's user avatar
  • 49.8k
37 votes

Program template for printing *any* string

Excel, 1 byte ' Ungolfed version ' <-- print the following text, and exit the current formula
Adam's user avatar
  • 601
37 votes

2 Cats in a Quine

V, 2 + 2 == 4 bytes 2i2i Try the quine! Try the cat! A is 2i B is also 2i How does it ...
DJMcMayhem's user avatar
  • 59.3k
36 votes

Error 404: Character Not Found

JavaScript, 228 bytes ...
jrich's user avatar
  • 4,146
36 votes

Hello, World! (Every other character)

Actually, 2 bytes HH Explanation: H, as you might expect, pushes Hello, World! to the ...
Okx's user avatar
  • 16.4k
36 votes

Code 3k to Codee k

Many languages, 4 bytes 16-1 Outputs 15. 16-11 Outputs 5. This is a CW answer for many languages it works for. Edit to ...
35 votes

Internal Truth Machine

Python 3, 29 bytes or~print(0) while 1:print(1) A full program, which if prefixed with 0 will print ...
Jonathan Allan's user avatar
34 votes

What are the five most powerful characters in your language?

Python, 18 numbers 237#- Produces as valid results: 1, 2, 3, 4, 5, 7, 16, 23, 24, 25, 27, 32, 35, 37, 69, 71, 72, 73 EDIT: ...
Leo's user avatar
  • 12.7k
34 votes

Orientation Oriented Programming

05AB1E, 5 14 15 18 rotations (5 6 7 8 unique, 61 213 1488 4367 bytes) ...
Kevin Cruijssen's user avatar
33 votes

What are the five most powerful characters in your language?

05AB1E, 27 38 41 numbers 4·>Ìn Generates the unique numbers: ...
Emigna's user avatar
  • 53k
32 votes

Take a stand against long quine lines

Lenguage, line length 0, ≈ 1.01 × 10805 bytes The source code consists of ...
Dennis's user avatar
  • 210k
31 votes

I reverse the source code, you negate the output!

PowerShell,  4  3 bytes 1-0 Try it online! or !enilno ti yrT Golfed a byte by using arithmetic instead of the number-comment-number format. This is ...
AdmBorkBork's user avatar
  • 43.4k
30 votes

Write a program that always prints N when it is shifted N times up the ASCII alphabet

Ook!, 95 programs, 19992 14066 bytes ...
Sp3000's user avatar
  • 61.9k
30 votes

I reverse the source code, you negate the output!

JavaScript (V8), 19 bytes print(1)//)1-(tnirp Try it online! almost identical to... C# (Visual C# Interactive Compiler), 19 bytes ...

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