# Questions tagged [code-challenge]

A code challenge is a competition for creative ways to solve a programming puzzle with an objective winning criterion not covered by other scoring tags (e.g. code-golf).

855 questions
Filter by
Sorted by
Tagged with
3k views

### Compose a song, line by line

It's time for CGCC to demonstrate our musical talent! In this challenge, you're going to compose songs while keeping your byte count as small as possible. On Day 0, multiple answerers will post a ...
167 views

### Leave a wake of dead cells behind you

Conway's Game of Life is a well known cellular automaton "played" on an infinite grid, filled with cells that are either alive or dead. Once given an initial state, the board evolves ...
276 views

### Largest Compatible Maze

Background Consider an $n\times n$ grid, where each cell is either empty (denoted by .) or a wall (denoted by #). We say that ...
9k views

### R.E.P.A.I.R. T.H.E. K.E.Y.B.O.A.R.D

Sequel of this AWESOME challenge You, a genius tech prodigy detective, have successfully disarmed the bomb and want to break into the computer. The police found the password ...
6k views

### Reverse Zip Bomb

A zip bomb is a compressed file, designed so that unpacking it yields the biggest file possible. These are fairly well known, and there are examples of 42 KB files which expand into multiple petabytes ...
248 views

### Two Diehards Make a Glider

In Conway's Game of Life, there is an infinite square grid of cells, each of which is alive or dead. The pattern changes each "generation". A dead cell with exactly 3 live neighbors (...
534 views

### Keep PPCG running in Game of Life

Conways' Game of Life is a well known cellular automaton "played" on an infinite grid, filled with cells that are either alive or dead. Once given an initial state, the board evolves ...
346 views

### I Rot-13 the source code, you Rot-19 the output!

This is alternate of a rip-off of a rip-off of a rip-off of a rip-off of a rip-off of a rip-off. Go upvote those! Your task, if you accept it, is to write a program/function that outputs/returns its ...
251 views

### 2D Pathfinding with Momentum

You are piloting a spaceship, outfitted with an engine that can accelerate you at 1km/s^2 in the direction the ship is facing (you have very good inertial dampers). You also have thrusters which can ...
3k views

### Minimally destroy CGCC in Game of Life

Inspiration Conway's Game of Life is a well known cellular automaton "played" on an infinite grid, filled with cells that are either alive or dead. Once given an initial state, the board ...
3k views

### Find the HTTP status code

Given the name of an HTTP status code, such as OK or Continue, output or return the corresponding number. Your code is limited ...
2k views

### Alphabet printing challenge

This challenge is related Challenge Your task is to write as many programs/snippets as you can, where each one outputs/prints/ returns an alphabet. The first program must output the letter ...
1k views

### Square root multiples

This code-challenge is based on OEIS sequence A261865. $A261865(n)$ is the least integer $k$ such that some multiple of $\sqrt{k}$ is in the interval $(n,n+1)$. The goal of this challenge is ...
246 views

### Make a QR quine [closed]

A "qruine" if you will :) Design a QR code that legibly spells with its pixels (or the space between them) the text that it scans to. For example, this QR code scans to the letter A, and ...
3k views

### Pangram “Hello, World!”

Your challenge: The code must print "Hello, World!" and nothing else. Your restrictions: Your program must satisfy these requirements: The program must be a pangram. It must use every ...
298 views

### Identify the Kaomoji!

Background This is loosely based on the now closed Kaomoji question asked a few hours ago. Kaomojis are sequences of characters designed to express a given emotion. In this code-challenge, you'll be ...
375 views

### Multiplying Quines

The program should start out with 2 separate files, here named "a" and "b". "a" and "b" should be what I am calling inverse quines: "a", when run, ...
866 views

### Definite integral of polynomial functions

You will need to evaluate the definite integral (bounded by $a$ and $b$) of a certain polynomial function that takes the form of: \int_a^b \left( k_n x^n + k_{n-1} x^{n-1} + \cdots + k_2x^2 + ...
217 views

### How long to paint this house? [closed]

Here is the problem, for which I can only think of an iterative solution and have not found a closed formula: You need to paint a house with R rooms. For each room there are four walls and one ...
366 views

### Largest Error Message in 100 bytes [duplicate]

The goal is to raise the error message with the most bytes! The error message may not be generated by the program itself, such as Python's raise. errors that do not ...
112 views

### Compute the minimal and maximal subset of a set of sets [closed]

Let S be a set of sets, for example S = {{A},{B},{A,B}}. A maximal subset, Max, is an element of S such that no other set in S ...
414 views

### Smallest image containing one of every RGB color

I'm not sure if this kind of golf is allowed, but here it is. Your objective is to create an image containing one pixel of every possible RGB color. The image with the smallest file size wins. Rules: ...
170 views

### 5 tasks in (modified) BrainF**k from the Estonian OI [closed]

Introduction This challenge appeared in the 2020 Estonian Open Informatics Olympiad and was created Sandra Schumann. I thought it was interesting because it involves symmetry and is quite hard even to ...
128 views

### Dobble Double Challenge [closed]

I have a problem, which I haven't found a solution for. Solutions to the first part are well documented, but I have yet to find anyone who has solved the second part. I call this the "Dobble"...
955 views

### Almost Illegal Strings, Mark II (Robbers)

This is the robbers' thread for 'Almost Illegal Strings'. See the cop's thread for information on participating. A section from the post is included here for convenience. The Robbers' Challenge Find ...
1k views

### Almost Illegal Strings, Mark II (Cops)

Edit 2020-11-06: This challenge has been edited with new provisions to encourage participation. The edits have been bolded for emphasis. Welcome to a cops and robbers version of Find an Illegal ...
292 views

### Gluing tetrahedra together

(This challenge exists to extend sequence A276272 in the On-Line Encyclopedia of Integer Sequences, and perhaps create a new OEIS sequence1.) This is a code-challenge, which will have you write code ...
2k views

### We're much closer than you think

Martin Ender's 2D programming language Alice has two different modes depending on what orientation the IP has: orthogonal (Cardinal mode) or diagonal (Ordinal mode). Commands in Alice change their ...
913 views

### Extend the most recent “nice” OEIS sequence: stepping stone puzzle on a grid

Today Neil Sloane of the OEIS sent out an email asking for a confirmation of the current terms, and computation of some larger terms of the latest OEIS sequence A337663 with the keyword "nice&...
448 views

Executive summary: Print NxN matrices $A$ and $B$ where $AB = 10A + B$. Largest N wins! Details: Entrants in this challenge should choose an N. Submit a program that takes an input integer '...
302 views

### More Codington Crescent

Who's up for a second attempt? If you've ever listened to the radio program "I'm sorry, I haven't a clue", then you've probably heard of the game called "Mornington Crescent". For ...
3k views

### Minimal maximum byte for Turing Completeness

Summary We already have a challenge for the minimal number of characters for Turing completeness. But what about the minimal maximum byte? Challenge For a language of your choice, find a subset of ...
3k views

### Approximate when you are going to die

A mortality table or life table is an actuarial tool that gives the probability that a person aged $A$ years will die in the next year, and is used to help calculate the premiums for life insurance, ...
2k views

### Substandard deviation

The mean of a population $(x_1,\dots,x_n)$ is defined as $\bar x=\frac1n\sum_{i=1}^n x_i$. The (uncorrected) standard deviation of the population is defined as $\sqrt{\frac1n\sum (x_i-\bar x)^2}$...
744 views

### Codington Crescent [duplicate]

Let's just see how this goes If you've ever listened to the radio program "I'm sorry, I haven't a clue", then you've probably heard of the game called "Mornington Crescent". For ...
2k views

Write a quine which attempts to invert the case of as many ascii characters in the source code as possible. For example in javascript: ...
1k views

### The 1+ Metagolf Challenge

I'm letting this one out of the sandbox. Hopefully it is well-written and make sense, feel free to improve. So in order to make 1+ more popular (and ease the creation of golfed 1+ text-printing ...
3k views

### Constructing an evil maze against random exploration

RollerCoaster Tycoon 2's maze is the inspiration for this question. Credit to Marcel Vos for thoroughly breaking the classic RCT2 AI. The pathfinding AI in this question is the AI in the latest ...
574 views

### Writing erasable code

My phone number (which I will not be sharing here) has a neat property where there is a two digit number, which when iteratively removed from my phone number will eventually remove all the digits. ...
4k views

### Create a Boolean Calculator

Our boolean operators are AND, OR, XOR, NAND, ...
3k views

### Orientation Oriented Programming

Write a program for a specific language that in different orientations performs different tasks. Your code should have at least two non-empty lines and at least two non-empty columns and should ...
733 views

### Metagolf the OEIS

We've had Meta Regex Golf and Display OEIS Sequences. Now, it is time for Meta OEIS Golf. Challenge Given a sequence of integers, your program/function should output a program/function in the same ...
1k views

### Shortlex predecessor

Please note the special scoring for this challenge. Given a non-empty string made of a-z, output the string immediately before it in the shortlex order. Shortlex ...
301 views

### Output NC_045512, the first sequenced genome of SARS-CoV-2 (COVID-19) [closed]

Output the variant NC_045512 of SARS-CoV-2. The genome's raw form is available here. Lowercase and uppercase are both acceptable You must output with the letters A, C, T, and G. An arbitrary number ...
2k views

### A rainbow of identity functions

Closely related: How high can you count? Challenge In your programming language of choice, write as many different identity programs/functions as possible, under the following constraints: Each ...
780 views

### Reverse busy beaver problem

In this challenge, Turing machines operate on a zero-initialized binary tape that is infinite in both directions. You are given an integer $N$, where $1 \le N \le 20000$. Your program has to ...
304 views

### Leon's shooting range problem

Leon's story Leon is a professional sling shooter and he comes to a shooting range everyday to practice. A casual target is not a challenge for him anymore so before shooting he first covers the ...
2k views

### Break The Chain

You are given an $25 \times 25$ square lattice graph. You are to remove certain nodes from the graph as to minimize your score, based on the following scoring system: Your score will be the \\$ \...