All Questions

Filter by
Sorted by
Tagged with
4 votes
4 answers
142 views

I baked you a pie!

There is an asdfmovie video about a pie flavoured pie. Someone also made an edited version with more pies, so I created this challenge. The input is a positive integer. The code should first output ...
HelloWorld's user avatar
13 votes
13 answers
495 views

Implement a simple stack language

In this challenge, you implement an interpreter for a simple stack-based programming language. Your language must provide the following instructions: push an arbitrary integer pop two numbers and ...
RubenVerg's user avatar
  • 711
8 votes
7 answers
466 views

Auto-golf an esolang

The lack of a social life drove a poor nerd into inventing another superfluous esolang called !+~%. For no good reason it initializes the accumulator with ...
Philippos's user avatar
  • 1,998
5 votes
11 answers
214 views

Output an image

Interestingly, although there are challenges that work with images, there is no challenge to simply output an image. This is that challenge Goal: output an image in the shortest possible code. Output: ...
Jakav's user avatar
  • 171
7 votes
0 answers
127 views

Solve the word problem*

In this challenge you will receive a list of positive integers \$W\$ called a word, and a square symmetric matrix \$M\$. Your task is to determine if the word can be turned into the empty list by ...
Wheat Wizard's user avatar
  • 96.6k
-1 votes
2 answers
101 views

Shapes Biscuits - An Un-identical paradox [closed]

Puzzle I have a packet of Shapes biscuits. I would expect all of them to be identical, but alas, stacking all of the Shapes does not result in a perfect hexagonal prism. I'd like to find out what ...
Ow Ji's user avatar
  • 7
8 votes
2 answers
609 views

Point-free JavaScript: write a function runner

In this programming-puzzle, your goal is to write the following function in JavaScript, using (essentially) point-free programming: (f) => void(f()) Your ...
Rydwolf Programs's user avatar
1 vote
14 answers
466 views

Smallest integer \$n\$ such that \$\frac{\sqrt{\log_2{n}}}{(\log_2 {\log_2 n})^2} > 1\$

Write code that outputs the smallest integer \$n > 5\$ such that \$\frac{\sqrt{\log_2{n}}}{(\log_2 {\log_2 n})^2} > 1\$. Your code may have at most one digit in its source code. You can use ...
Simd's user avatar
  • 2,024
9 votes
0 answers
111 views

Construct the Constructability sequence

Consider compass-and-straightedge construction, where you can construct new points from existing ones by examining intersections of straight lines and circles constructed with one of the following two ...
caird coinheringaahin g's user avatar
2 votes
0 answers
136 views

Clone GNU cat 8.32

Write a program that precisely clones GNU cat version 8.32, which is installed on my computer. In any case, if called with the same arguments, same stdin, and same ...
Somebody's user avatar
  • 1,216
-1 votes
11 answers
373 views

Print 100 digits of Champernowne's Constant

Inspired by this and this question Challenge Your challenge is to print any 100 consecutive digits of Champernowne's Constant. You must give the index at which that subsequence appears. The 0 at the ...
CrSb0001's user avatar
  • 165
-1 votes
0 answers
58 views

Getting the full rainbow every rgb or hex color hue [closed]

Output should be a array of hex colors or rgb colors Here’s my code I made it can also get rgb colors but I wanted to put hex for fun ...
Mr.weirdCodeDude's user avatar
13 votes
14 answers
1k views

What's the character limit of this text field?

Someone I know has no coding experience, but has proposed an algorithm* to determine the character limit of text fields they find online. They copy a string containing the numbers from 1 to 1,000 ...
Luke Sawczak's user avatar
13 votes
7 answers
1k views

Compute probability of seeing all the balls

Given \$x\$ distinguishable balls (say they have different colors), sample with replacement repeatedly until all the balls that have been seen, have been seen at least twice. Challenge The input is ...
Simd's user avatar
  • 2,024
9 votes
7 answers
1k views

Night hike partitioning

We want to go on a night hike with the youth group, but of course not everyone has their torch, even though we told them we planned to split up. What options are there for group formation if n teens ...
Philippos's user avatar
  • 1,998
-1 votes
0 answers
127 views

What is the shortest regex for the name "SAMUEL"? [duplicate]

Suppose that someone is trying to access records from a database on swim lessons. At one point during the conversation, a customer says, "The student's name is Samuel Doe". However, the name ...
Samuel Muldoon's user avatar
0 votes
0 answers
69 views

What is the shortest regular expression (REGEX) you can create for variants on the name "ELLEN"? [duplicate]

Imagine a partially automated customer service phone line. At one point during the conversation, a customer says, "My name is Ellen Doe". However, the name on record is spelled differently. ...
Samuel Muldoon's user avatar
11 votes
14 answers
3k views

Can the chefs go?

On the TV cooking show Guy's Grocery Games, the chefs cannot begin shopping until Guy Fieri, the show's host, says "Three, two, one, go!" However, the words do not have to be all together. ...
Somebody's user avatar
  • 1,216
5 votes
4 answers
752 views

Perform Gray Addition

Objective Given two non-negative integers encoded in unbounded-length Gray code, add them and output the result, where the result is also encoded in Gray code. Gray code There are many equivalent ...
Dannyu NDos's user avatar
  • 5,497
16 votes
10 answers
4k views

ASCII-art milk carton

The following is an unfolded milk carton: ...
noodle man's user avatar
  • 5,547
0 votes
1 answer
74 views

Parse nested absolute values 2 [duplicate]

Looking at Arnauld's answer, it seems like this version is not really more difficult than the other version, so I made it an optional requirement of the other challenge The absolute value of a number \...
bsoelch's user avatar
  • 5,865
14 votes
6 answers
767 views

Parse nested absolute values

The absolute value of a number \$x\$ is normally written as \$|x|\$. The left and right side of the absolute value uses the same symbol, so it is not immediately obvious how to parse nested absolute ...
bsoelch's user avatar
  • 5,865
22 votes
12 answers
4k views

80% of respondents agreed…

Sometimes I see a claim like "80% of respondents agreed" and I think "what was your sample size? 5?" because, of course, with a sample size of 5 it's possible to get 80% to agree ...
msh210's user avatar
  • 3,423
5 votes
3 answers
789 views

Golf an HQ9+ transpiler

There was a prior question about golfing an HQ9+ compiler that translates HQ9+ code into the language it is written in, but that was closed as a duplicate of the interpreter challenge because ...
Somebody's user avatar
  • 1,216
11 votes
3 answers
573 views

Write the date in abbreviated Latin

Inspired by How do you write dates in Latin? Challenge Given a month-and-day date, output that date in abbreviated Latin, as explained below. Input Input is flexible. You may choose to: Take a date ...
Stef's user avatar
  • 699
13 votes
11 answers
2k views

Ungolf the Wind

Weather conditions at airports are reported to pilots in METAR (METeorological Aerodrome Report) format. This format could be described as being "golfed." Here are some examples: ...
Somebody's user avatar
  • 1,216
16 votes
8 answers
921 views

One-dimensional map colouring

It is a well-known fact that you can colour a two-dimensional map with four colours in such a way that two countries with a common border always have different colours. There have already been enough ...
Philippos's user avatar
  • 1,998
15 votes
9 answers
2k views

Write a Web server quine

Write a program that accepts HTTP requests on any port of your choice above 1024, and responds to requests on any URL of your choice with its own source code. It must work with, at least, Firefox and ...
Somebody's user avatar
  • 1,216
16 votes
20 answers
2k views

Just another traffic jam!

One lane is closed, the vehicles have to thread their way in according to the zip-lock system: One car from one lane, the next car from the other lane, always taking turns. Input: Two vehicle queues, ...
Philippos's user avatar
  • 1,998
0 votes
21 answers
860 views

How Many Paint Tins Do I Need?

Task Take in 3 inputs. The length of the wall, the height of the wall and the coverage of the paint. Output how many tins of paint are required. Output Since there's no way to purchase ...
I.T Delinquent's user avatar
16 votes
16 answers
4k views

Which skill to train?

Story (skip, if you prefer the naked task): You need five skills for an imaginary sport: Speed, strength, endurance, accuracy and tactics. If you achieve a score in each of these disciplines, you can ...
Philippos's user avatar
  • 1,998
4 votes
1 answer
193 views

Convert real numbers between factoradic and positive integer bases

This prompt asked you to convert back and forth to factoradic, but is very limited in scope (only decimal integers from 0 to 10!-1). Your task in this challenge is to reach just a bit further and ...
guest4308's user avatar
  • 189
-3 votes
1 answer
210 views

Bingo Cards SVG Code [duplicate]

Generate the contents of an SVG file containing 6 bingo cards. Winner is the one that uses the shortest code. A qualifying answer has an output that can be directly pasted in a blank to get the ...
paki eng's user avatar
  • 175
5 votes
4 answers
945 views

Shortest C code to display argv in-order

I recently tried to produce the shortest C code possible to display all its command line arguments (which are stored in argv). I ended with a relatively small piece of code, and I was wondering if ...
Chi_Iroh's user avatar
  • 163
8 votes
1 answer
262 views

Tips for Golfing in Vyxal 3

The reason for this question is because I made a deadlineless bounty and I need a tips question to link in the bounty Vyxal 3 is the third major version of the Vyxal golfing language. As it is ...
lyxal's user avatar
  • 32.3k
19 votes
38 answers
3k views

Print the Christmas alphabet

Write a program to print or return one of these strings verbatim: abcdefghijkmnopqrstuvwxyz ABCDEFGHIJKMNOPQRSTUVWXYZ Notice that there is no L.
Somebody's user avatar
  • 1,216
1 vote
0 answers
132 views

Produce a secure block cipher round function (1 bit round key; 7 bit message)

We need to produce a block cipher round function with a 1 bit round key size and a 7 bit message size with the highest level of cryptographic security according to our measure of security. ...
Joseph Van Name's user avatar
18 votes
35 answers
2k views

Rudin-Shapiro sequence

The Rudin-Shapiro sequence is a sequence of \$1\$s and \$-1\$s defined as follows: \$r_n = (-1)^{u_n}\$, where \$u_n\$ is the number of occurrences of (possibly overlapping) \$11\$ in the binary ...
alephalpha's user avatar
  • 46.7k
15 votes
2 answers
2k views

Shortest Algorithm* That Generates a Harlequin Pattern

What is the shortest sequence of moves that, from the solved state of the cube, creates a pattern that meets the following criteria: 6 colors on each face at most 2 facelets of the same color no ...
q-l-p's user avatar
  • 293
0 votes
0 answers
71 views

Write a checker quine [duplicate]

Write a program that takes a string as input and returns truthy if the string is the same as the source code, falsy otherwise. The usual restrictions on quines apply.
Somebody's user avatar
  • 1,216
9 votes
3 answers
560 views

Get the Bible verse

Write a program that accesses Project Gutenberg's KJV Bible, either from a file called pg10.txt in the working directory or in any other way that is typical for the ...
Somebody's user avatar
  • 1,216
-3 votes
4 answers
209 views

Answer a Loaded Question (with Lojban!) [closed]

A loaded question is something like 'Have you stopped swearing?' in which both yes and no answers mean that I have swore, meaning it is impossible to answer the question if I haven't swore. However, ...
HelloWorld's user avatar
19 votes
9 answers
2k views

Limited letter renderer: BIOPD

There have of course been challenges to render ASCII art fonts here and there. This challenge doesn't add anything to those. In contrary, it subtracts from them for a good reason. If you allow all ...
Philippos's user avatar
  • 1,998
13 votes
21 answers
4k views

German pharmacy payment

Your task is to calculate the amount you have to pay for prescribed medication at a pharmacy in Germany. The amount is simply based on the full price of the item, which will be your input. It is a ...
corvus_192's user avatar
  • 4,907
-10 votes
1 answer
327 views

Bingo Cards PDF

Write code to generate a PDF file containing 6 bingo cards. Winner is the one that uses the shortest code and needs no actions except for installing a library and running the code. (No Save As PDF). ...
paki eng's user avatar
  • 175
15 votes
13 answers
1k views

Golf Transmission

As in, the 5 speed transmission from the original VW Golf GTI. Print the transmission pattern in as few bytes as possible. Yes I know this isn't what it actually looks like but the GTI 5 speed shift ...
Pacmanboss256's user avatar
14 votes
22 answers
2k views

Decode the date in Christmas Eve format

This is the inverse of "Encode the date in Christmas Eve format." Write a program that takes as input the string Christmas, possibly followed by ...
Somebody's user avatar
  • 1,216
10 votes
36 answers
3k views

Print ASCII building

Challenge Display to the screen or write to stdout this exactly: ...
lame-lexem's user avatar
7 votes
2 answers
303 views

How many twisted corners?

Your challenge is to output the number of twisted corners given a 2x2 Rubik's Cube scramble. For the purpose of this challenge, twisted corners are defined as corners where the colour of the top/...
math scat's user avatar
  • 8,563
17 votes
21 answers
2k views

Monotone sequence beatitude

Provided that the input is a monotone sequence of three or more integers: Output -2 if the sequence strictly decreases. Example: [7,4,3,2] Output -1 if the ...
Dannyu NDos's user avatar
  • 5,497

15 30 50 per page
1
2 3 4 5
279