# All Questions

14,047 questions
Filter by
Sorted by
Tagged with
1k views

### Convert to Spoken Binary

Introduction In the video the best way to count, binary is proposed as the best system of counting numbers. Along with this argument is a proposal on how to say numbers in this system. First, we give ...
• 1,675
1k views

### Format Datetime in 30-Hour Clock Time

Input a datetime, format the datetime in YYYY-MM-DD HH:mm:ss format using 30-hour clock time. The 30-hour clock time works as: After 6 a.m., it is same as 24-hour ...
• 34.7k
316 views

### Maximum pentagon sum

For this problem you are given an $n \times n$ matrix of integers. The task is to find a pentagon in the matrix with maximum sum. The pentagon must include part (or all) of the x and y axes as two ...
• 2,896
439 views

### Stably sort N elements in this restricted "cmov" language

The following problem is taken from the real world — but indubitably code-golf! In this puzzle, the programming language is fixed, and your job is to write the most ...
• 793
6k views

### Am I vaccinated?

Disclaimer: the content of this post is not medical information and should not be used for any medical purpose, as it is deliberately oversimplified for the purpose of the challenge. There are several ...
• 1,580
280 views

### Translate Japanese hiragana into the flick input method

The flick input method is a way of inputting Japanese kana on a modern smartphone. It is arranged in a 12-key layout, with the following labels: あかさ たなは まやら 小わ、 ...
• 9,338
2k views

### Test whether a sequence is bitonic

You know what a monotonic sequence is: each element is bigger than its predecessor (monotonically rising) or as its successor (monotonically falling). Bitonic means you have two arms of the sequence, ...
• 2,501
164 views

### Golf a PSK31 modulator

Given a string of ASCII text as input, encode it in BPSK31 using Varicode. You may either output an audio file in any common format, or play the audio over the device speakers. You may output at any ...
• 1,580
220 views

### Smashing Dominoes [closed]

Challenge This challenge is based on the domino effect: Initially, each domino is located on one straight line and is in a vertical state. It can be dropped either to the left along the same straight ...
• 11
567 views

### Finding the optimal straight line boundary

Consider an $n \times n$ grid of integers. The task is to draw a straight line across the grid so that the part that includes the top left corner sums to the largest number possible. Here is a ...
• 2,896
436 views

### Maximal linear sublists

In this challenge you will write code to take a list of positive integers and output all maximal linear sublists. A sublist is is a list which can be created by deleting values from the the input ...
• 98.5k
558 views

### Find the sum of the numbers on the circle

Consider an $n \times n$ grid and a circle of radius $r \leq \sqrt{2} n$ with its center in the top left. In each square there is an integer from the range -3 to 3, inclusive. For a given radius, ...
• 2,896
437 views

### Cell`s Life #1: Simulate a plant cell

What am I? As a plant cell, your program/function/etc. must undergo photosynthesis: When the input is 6CO2+6H2O+light in any order, output ...
• 390
245 views

### Is it stuck in a counting loop? [duplicate]

Given a list of non-negative integers the function $f$ replaces every integer with the number of identical integers preceding it (not necessarily contiguously). So ...
• 98.5k
1 vote
288 views

### Yin-Yang Table Generator [closed]

I want an n*n table that is filled with black or white and the following conditions are satisfied in it: All cells of a 2*2 square in this table should not be the same color. All black and white ...
3k views

### Iteratively sort a list

Given a list of Integers greater than zero, Sort each of the unique values in ascending order, then repeat the process on the remaining duplicate values and append. Example: ...
• 3,760
622 views

### Longest irreducible quine

Write an irreducible proper quine, i.e. a program that prints its own source code, which can't be reduced by removing characters to a shorter program with the same constraints. Eg. the python quine: <...
• 9,228
381 views

### Output 5-line calendar

Given year, month and optionally weekday of 1st, output the calendar of the month. The first week should remain nonempty. For empty cell, fill it with the date where it's supposed to be, in last or ...
• 23.8k
578 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 ...
4k 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 a positive number pop two numbers and push ...
• 792
2k 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 ...
• 2,501
2k 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: ...
• 335
277 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 ...
• 98.5k
1k 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 (tacit) programming: (f) => void(f()) ...
• 18.7k
680 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 ...
• 2,896
261 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 ...
• 49.9k
1 vote
246 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 ...
• 1,580
591 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 ...
• 357
3k views

### What's the character limit of this text field? [duplicate]

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 ...
• 653
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 ...
• 2,896
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 ...
• 2,501
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. ...
• 1,580
796 views

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 ...
• 5,941
4k views

### ASCII-art milk carton

The following is an unfolded milk carton: ...
• 6,863
82 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 \...
• 6,015
826 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 ...
• 6,015
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 ...
• 3,443
828 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 ...
• 1,580
605 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, following conventions from other ...
• 879
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: ...
• 1,580
958 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 ...
• 2,501
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 ...
• 1,580
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, ...
• 2,501
883 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 ...
• 557
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 ...
• 2,501
217 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 ...
• 437
232 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 ...
• 175
1k 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 ...
• 173
306 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 ...
• 33.2k