Linked Questions

619 votes
328 answers

Produce the number 2014 without any numbers in your source code

Note to challenge writers as per meta consensus: This question was well-received when it was posted, but challenges like this, asking answerers to Do X without using Y are likely to be poorly received....
Joe Z.'s user avatar
  • 34.8k
393 votes
49 answers

Covfefify a string

In this challenge, you must take a string matching the regex ^[a-zA-Z]+$ or whatever is reasonable (you don't have to consider uppercase or lowercase letters if you ...
Destructible Lemon's user avatar
77 votes
170 answers

Diagonal Alphabet

Given no input, your task is to generate the following: ...
Stephen's user avatar
  • 13.8k
57 votes
169 answers

Output programming language name

Challenge: In the programming language of your choice, take no input and output your programming language's name. Fair enough, right? Restrictions: You can't use any character that is included in ...
Offtkp's user avatar
  • 3,062
76 votes
119 answers

Make an alphabet searchlight!

Inspired by a bug in a solution to this challenge, your challenge is to produce this exact text: ...
MD XF's user avatar
  • 13.8k
65 votes
125 answers

Duck, duck, goose!

Remember the kids game, 'Duck, Duck, Goose'? No? Me neither. The challenge Print the word 'duck' on individual lines an indeterminate amount of times. Print the word 'goose'. Your program ends. The ...
AJFaraday's user avatar
  • 11.8k
62 votes
111 answers

Goodbye Cruel World!

Background Hello golfers! I would like to learn all the programming languages! But I kinda have a short attention span... and copying all the Hello World examples gets boring... but I like fire! ^w^ ...
Tezra's user avatar
  • 1,547
88 votes
61 answers

Shut down the computer!

Challenge: In the programming language of your choice, shut down the machine that your code was executed on. Rules No shutting down by resource exhaustion (e.g.: forkbomb to force shutdown) You are ...
Offtkp's user avatar
  • 3,062
100 votes
54 answers

Sleep for 1000 years

Some sleep commands implement a delay of an integer number of seconds. However, 2³² seconds is only about 100 years. Bug! What if you need a larger delay? Make a ...
anatolyg's user avatar
  • 13.4k
87 votes
64 answers

From Programming Puzzles to Code Golf

Your task is to write a program that outputs the exact string Programming Puzzles (trailing newline optional), but when all spaces, tabs, and newlines are removed ...
user avatar
61 votes
91 answers

Implement Minceraft

Introduction The game Minecraft has a 1 in 10000 chance of showing "Minceraft" instead of "Minecraft" on the title screen. Your challenge Your challenge is to code a function or ...
emanresu A's user avatar
  • 37.1k
182 votes
29 answers

Do you want to code a snowman?

Here is a simple ASCII art snowman: _===_ (.,.) ( : ) ( : ) Let's make him some friends. This will be the general pattern for our ASCII art snowpeople: ...
Calvin's Hobbies's user avatar
77 votes
66 answers

Sing Baby Shark

"Baby Shark" is a children's song about a family of sharks. Having long been popular as a campfire song, it has been popularized since the mid-2000s by social media, online video and radio. - ...
njha's user avatar
  • 987
66 votes
60 answers

Determine your language's version

Your challenge is to write a polyglot that works in different versions of your language. When run, it will always output the language version. Rules Your program should work in at least two versions ...
MD XF's user avatar
  • 13.8k
38 votes
120 answers

Numbers by Position

Challenge Print the numbers: 1 22 333 4444 55555 666666 7777777 88888888 999999999 In that order. I/O Takes no input. The numbers can have any delimiters desired (...
ouflak's user avatar
  • 2,051
133 votes
32 answers

A keyboard so real you can almost TASTE it

... Not that you would, would you? The task is simple, output the following text: ...
Magic Octopus Urn's user avatar
83 votes
50 answers

Telescopic Parentheses

Consider a non-empty string of correctly balanced parentheses: (()(()())()((())))(()) We can imagine that each pair of parentheses represents a ring in a ...
Martin Ender's user avatar
104 votes
30 answers

Print a Negative of your Code

Consider a square of printable ASCII characters (code points 0x20 to 0x7E) for side length N, like the following (here, N = 6): ...
Martin Ender's user avatar
95 votes
36 answers

Eww, those bytes are gross

Write a program or function that, when given a string, filters out as many distinct bytes as it can and returns the cleaned string. However, since your program hates them, none of these bytes can be ...
Jo King's user avatar
  • 47.1k
82 votes
45 answers

Fibonacci + Fizz Buzz = Fibo Nacci!

Fibonacci + FizzBuzz = Fibo Nacci! Your challenge is to create a Fibo Nacci program! A Fibo Nacci program outputs the first 100 Fibonacci numbers (starting from 1). If the Fibonacci number is ...
user41805's user avatar
  • 13.1k
31 votes
93 answers

Make me a square!

Task Given one non-whitespace printable character, make a 3x3 square representation of that input. For example, if the input is #, then the output is: ...
Luc H's user avatar
  • 559
63 votes
52 answers

How much code would a codegolf golf if a codegolf could golf code?

Write a function or program that takes two words as input and outputs variants of the popular English tongue-twister "How much wood would a woodchuck chuck if a woodchuck could chuck wood?". The ...
Greg Martin's user avatar
  • 15.4k
96 votes
35 answers

Would this string work as string?

Write a program that takes a single line string that you can assume will only contain the characters /\_‾. (That's forward and backward slash, underline and ...
Discrete Games's user avatar
75 votes
39 answers

Stack Exchange Vote Simulator

Write a program or function that takes in a string only containing the characters ^ and v (you can assume there will be no other ...
Calvin's Hobbies's user avatar
54 votes
49 answers

Outputting ordinal numbers (1st, 2nd, 3rd)

I would like to generate (as a return result of a function, or simply as the output of a program) the ordinal suffix of a positive integer concatenated to the number. Samples: ...
Nicole's user avatar
  • 643
76 votes
41 answers

Legen… wait for it…

dary! In events entirely unrelated to what will hopefully happen to me in the next couple of days, I task you to write code that does the following: Print ...
Dennis's user avatar
  • 210k
43 votes
63 answers

The Real Slim Shady

Echo the following in as few bytes as possible: ...
rybo111's user avatar
  • 4,547
36 votes
66 answers

Generate a deck of cards

Here's an array representing a standard deck of cards, including two Jokers. ...
AJFaraday's user avatar
  • 11.8k
26 votes
88 answers

Swapping "Good" and "Bad"

Challenge Description: Write a program that asks the user for input. The user will enter Good or Bad. You do not have to ...
Ishaq Khan's user avatar
102 votes
24 answers

Where's the 0xBEEF?

This challenge was inspired by this Wendy's commercial from 1984. Illustration by T S Rogers Your task is to find a hexadecimal 0xBEEF on a binary bun. The 'beef' consists of the following pattern: ...
Arnauld's user avatar
  • 191k
37 votes
70 answers

Cat goes "Meow"

cat goes "Meow" We are all familiar with the concept of a cat program. The user types something in, it is echoed back to the ...
user avatar
67 votes
33 answers

Print my clock's alarm sound

Write the shortest program that prints the sound my alarm clock makes, and stops after an inputted number of beeps. For reference, here is the sound my alarm makes: ...
Rydwolf Programs's user avatar
84 votes
28 answers

You're on a 8 day streak!

Duolingo, the language learning app, has a lot of things going for it, but there is one major issue that drives me crazy. It tells me how many days in a row I've used the app with a message like You'...
Luke's user avatar
  • 5,371
55 votes
35 answers

Encode the date in Christmas Eve format

The day this post was published was Christmas Eve. Tomorrow will be Christmas. Yesterday was Christmas Eve Eve. In two days it will be ...
Christopher King's user avatar
39 votes
54 answers

List all possible titles for the Anno games

In the Anno video game series there are 6 games with a 7th one announced for early 2019. Their titles always feature a year in a specific pattern: ...
Laikoni's user avatar
  • 26.1k
39 votes
53 answers

Determine the depth of an array

A simple challenge for your Monday evening (well, or Tuesday morning in the other half of the world...) You're given as input a nested, potentially ragged array of positive integers: ...
Martin Ender's user avatar
42 votes
46 answers

A Programming Puzzle of Mode Golf

Your task is to print the text Good morning, Green orb!, with every character repeated in place as many times as the most frequent byte in your source (the mode). ...
Wheat Wizard's user avatar
  • 97.7k
28 votes
63 answers

Write a "Hello" interpreter

Background Hello is a language "written" by Anne Veling, which errors if the program does not contain only h, and will print ...
the-cobalt's user avatar
35 votes
59 answers

Russian Roulette

Write a program which plays Russian Roulette! If the program is started, there should be a 5 in 6 chance of it ending normally after printing "I survived!" there should be a 1 in 6 chance of the ...
vsz's user avatar
  • 8,117
36 votes
49 answers

Generate Monday Numbers

Monday numbers, as defined by Gamow in this question over on Puzzling, are positive integers N with the following three properties: The decimal representation of N does not contain the digit 0 The ...
AdmBorkBork's user avatar
  • 43.3k
48 votes
42 answers


Lots of people on this site use esoteric languages, and since these languages are unusual and hard to understand, they will frequently write an explanation in a certain format. For example, if the ...
DJMcMayhem's user avatar
55 votes
26 answers

DON'T... do NOT lowercase UPPERCASE this!

Write a program that outputs its input unchanged. However: If all uppercase characters are removed from the program, it lowercases all uppercase letters. If all lowercase characters are removed from ...
darrylyeo's user avatar
  • 7,887
34 votes
48 answers

Output the hours at 90 degrees

Today while playing with my kids I noticed that an apparently simple toy in the park hid a challenge. The wheel has a triangle that points to a number, but also has three circles that point to the ...
Charlie's user avatar
  • 12.8k
107 votes
12 answers

Proving that a Russian cryptographic standard is too structured

The aim of this challenge is to find an impossibly short implementation of the following function p, in the langage of your choosing. Here is C code implementing it ...
picarresursix's user avatar
33 votes
41 answers

Bubbler and 3 others are typing․․․

Task Implement a kind of "some users are typing" system, which can be found in Discord and some other chat clients. If 1 user (say, Bubbler) is typing, output ...
Bubbler's user avatar
  • 75.1k
43 votes
25 answers

Tribute to Stan Lee

Unfortunately one of the greatest comic book writers passed away yesterday afternoon. Lots of Hollywood stars, musicians, actors, and many other people are paying tribute to this awesome writer, so we ...
Luis felipe De jesus Munoz's user avatar
37 votes
41 answers

What temperature is my stove?

My stovetop has 10 (0 through 9) different settings of heat and a very odd way of cycling through them. It always starts at 0 When I hit plus it increments the number, unless the number is 9 in ...
Wheat Wizard's user avatar
  • 97.7k
34 votes
40 answers

Render "Digital Clock Style" Numbers

Write the shortest program which will take a string of numbers (of up to at least 20 length) as input, and display the output using the standard digital clock style numbers. For instance for input 81,...
mootinator's user avatar
  • 1,199
38 votes
34 answers


Print or return the following string: zottffssentettffssenttttttttttttttttttttffffffffffffffffffffsssssssssssssssssssseeeeeeeeeennnnnnnnnno This is the first ...
Sisyphus's user avatar
  • 14.7k
35 votes
38 answers

Is it Christmas?

Challenge Given that Christmas is: December Month 12 Day 25 Every year, determine today's date, and whether or not today is Christmas. If it is Christmas, you must print ...
Patrick Perini's user avatar

15 30 50 per page
2 3 4 5