Testing ground for new challenges. Post here to get feedback, edit to adjust, and then when you're ready, post in Challenges.
Filters (None)
Find a closed knight's sightseeing tour[1] of a 61 by 61 board. Shortest wins. Definitions A square is visible from another square if it is a knight's move away from it. A closed knight's sigh...
Now posted: 5 by 5 knight's tour string validator The squares of a 5 by 5 chessboard are labelled with the letters A to Y in English reading order: A B C D E F G H I J K L M N O P Q R S T U...
Generate a sequence of squares on a chessboard that are a knight's move apart and cover all of the squares. Input A number $N$ from 5 to 26 inclusive. Output A sequence of squares, in any...
Now posted: Number of sides on a polygon Input The name of a polygon. You are only required to handle inputs listed in the test cases. Output The number of edges the polygon has. Te...
Now posted: Digits from words Convert a number in words to digits. Input A number in words from one to ninety-nine. Output The corresponding number in digits from 1 to 99. This may be...
Now posted: Cod golf: condense your shoal Your answer is a string containing 255 fishes as subsequences, and your score is the length of that string in bytes (lowest score wins). Rules Your ...
Now posted: Single letter HTML Indicate whether a letter is an HTML element. Input A single lowercase letter. Output An indication of whether the input is a standard HTML element. Thi...
Now posted: Connected bits Indicate whether the 1s and 0s in an 8 by 8 grid are connected. The grid Connectedness is by orthogonal adjacency (up, down, left, right). Diagonal adjacency doe...
Now posted: Lone ones Given an integer, output the number of lone 1s in its binary representation. Input An integer from $0$ to $4294967295$ (that is, $2^{32}-1$). In binary that's fro...
The Context: I have officially deprecated SHA-2 and SHA-3. This decision stems from a critical security breach I witnessed: a virus that infected my system using forged digital signatures that wer...
Output a sequence of digits, with no 2 subsets of the digits 0 to 9 having equal population size. Input There is no input for this challenge. Output A finite sequence of digits from 012345678...
Now posted: Awkward Ordinals Write code that takes a positive integer and outputs the awkward ordinal name from the test cases. Notice that these are not the conventional ordinal names, although...
Now posted: Digit balanced numbers Does a number have balanced numbers of distinct digits? That is, do the number's digits appear with equal frequency? Input A positive integer N. N will ha...
Now posted: Expand a greyscale/colour hex code Consider a type of hexadecimal colour code that supports shorthand for both greyscale and colour: A 6 digit code is interpreted as 2 digits for ...
Now finalized: Display a Progress Bar The goal of this challenge is simple: given a ratio of whole numbers, output a 50-character long progress bar representing the ratio. Rules Input Your pr...
The challenge is to write as short a source as possible, where the English alphabet (in alphabetical order from top to bottom) "abcdefghijklmnopqrstuvwxyz" is a subsequence of the source code. The...
Your task is to implements the product of polynomials modulo 2 $(\mathbb F_2[x]$) in integer representation. Background The field $\mathbb F_2$ represents the integers modulo 2, or equivalently, ...
Given 3 dimensional (3D) Cartesian coordinates (x, y, z), output the 3D compass point that comes nearest to describing the direction from the origin. Definitions Directions In reality, the direc...
Given a list of spheres, output an image. Produce a greyscale orthographic (parallel projection - no perspective) ray caster, that renders only plain grey spheres with no lighting. Input A lis...
Now posts: Multiplicative perfection Given a positive integer, indicate whether it is the product of its proper divisors. Integers equal to the product of their proper divisors can be found on ...
Now posted: How many odd digits? Given a positive integer, count its odd digits. Input An integer from 1 to 999,999,999, inclusive. Output The number of odd digits in the input. Tes...
Now posted: Net or not? Given a hexomino, indicate whether it is a net of a cube. Input A 6 by 6 grid containing exactly 6 filled squares. The 6 filled squares will be in a single edge ...
Now posted: Most isolated of 3 points Given 3 points, output one that is separated from its nearest neighbour by the largest distance. Input 3 distinct points (that is, no 2 points are in th...
Now posted: Hex detector Given an integer from 1 to 1000, indicate whether it is a centered hexagonal number (also known as a hex number). What is a hex number? The hex numbers can be visua...
Finalized: Fibonascii Squares The Challenge Your job is to, given input positive non-zero integer $n$, output an ASCII representation of the tiled Fibonacci squares up to the $n$th number of th...
Now posted: Round trip stones $N$ vessels initially contain $3$ stones each. What is the probability of having at least $3$ stones in the first vessel after moving a uniformly random selection f...
Now posted: The 50 substrings that validate any string of Roman numerals Given a string of Roman numerals, decide whether it forms a valid Roman number. If not, output the substring that proves ...
Posted: https://codegolf.codidact.com/posts/291018 Your mission for today, should you choose to accept it, is to write a simple 12-hour clock calculator. Your input will always be in the form of a...
Now posted: Print virtual fractions / 2-adic fractions / Modular multiplicative inverse TL;DR Print this values (or an extension of them): 1 43691 52429 28087 36409 35747 20165 61167 6...
Sandbox Would you change anything about the test case format? Are there any more edge cases to add to the test cases? Should words that use the same grid position more than once be c...
Posted Given an integer, find its shortest representation in generalised Roman numerals. Since there is more than one way to generalise, only the definition shown below applies to this challenge. ...
Now posted: Single digit Roman numeral Given a single character, which is a valid Roman numeral, output its value. Values There are 7 valid single character Roman numerals, with the following va...
Now posted: Borromean coprimes Given 3 positive integers, indicate whether they are Borromean coprimes. Definition 3 positive integers are called Borromean coprimes if both of the following ar...
Now posted Input is a number, you have to decide if it is part of the mandelbrot set or not, after at least 16 iterations. This is done by applying this formula: $z_n = z_{n-1}^2 + c$ repeatedl...
Now posted: Word suggesting Suggest a word from a word list, given a string. Motivation Imagine typing a word one letter at a time, and seeing a suggested word after each letter is typed. At f...
Now posted: Probability of rolling all 6 dice faces The probability of rolling every number from 1 to 6 with $N$ six-sided dice. Input A positive integer $N$. Your code must work for inputs...
Now posted: Expected value of highest dice rolled You roll $N$ dice simultaneously. Your score is the highest number rolled. If you play this game many times, what is the expected value (mean) o...
Introduction What is ROT13? It's basically a cipher sequence that changes a letter's value from the number chosen. If we use ROT1 on "games", we get "hbnft". The basic interpretation of ROT13 is i...
Disclaimer This challenge also exists in CGCC, but if you want to compete here (too), then hop in! Challenge Recreate "99 Bottles of Beer on the Wall", using the least bytes possible. Lyrics: ...
Challenge Create a program that takes input of a string and outputs an integer using the following calculation system: The string can only contain +, -, *, /, ^, ! (or a different character; ! ...
Background I went on an adventure Grabbed resources and making deeds Like start to work on the materials To build the shelter I need It was a marvelous one At least in the eyes of mine And w...
Challenge What do computers understand? That's right, binary. All files are turned into binary digits when you run them, but what if I suggest giving you an int then turn it into it's binary value...
Challenge Make a program that takes input of an integer that's $n > 1$ and print out a staircase using a specific character for stair basing (hashes (#) for demonstration; you can use spaces,...
Challenge Make a program that takes input of a string and abbreviate it. All letters of an abbreviation are capitalized, so keep that in mind. Whitespace, numbers and non-English characters ar...
Challenge Write a program that prints its reversed self. For example, if your code is foo() Then it'll output: )(oof Make sure that the quine is a valid one, as defined here: No cheatin...
Background Check out this video on the Collatz conjecture, also known as A006577[1]. If you don't know what this is, we're given an equation of $3x + 1$, and it is applied this way: If $x$ is ...
Background Inspired by this challenge that is also a mathematical English translator. Challenge Write a program that translates a mathematical expression using English with the following specifi...
Challenge Make a program that takes input of 3 non-negative integers: a result and 2 other values that once calculated results to the 3rd value. The program must figure out how to get the 2 fir...
