# All Questions

10,501 questions
62 views

### produce the teddyPattern [duplicate]

My youngest son formulated a letter pattern the other day. ...
728 views

### Words hidden in my phone number [closed]

Telephones in the United States (and perhaps some other places) have letters associated with some of the numbers. ...
433 views

### Relevant Part for a Badminton Serve

Introduction: I saw there was only one other badminton related challenge right now. Since I play badminton myself (for the past 13 years now), I figured I'd add some badminton-related challenges. ...
5k views

### Calculate the Mean mean of two numbers

disclaimer: the Mean mean is made up by me Define the arithmetic mean of $n$ numbers as $$M_1(x_1,...,x_n)=\frac{x_1+x_2+...+x_n}{n}$$ Define the geometric mean of $n$ numbers as M_0(x_1,...,...
2k views

### Rotate a column

Given an integer k and either a block of text, or a 2d array that the inner arrays may have unequal lengths (that resembles a block of text), rotate every character or element in the k-th column up or ...
317 views

### New Order #3: 5 8 6

Introduction (may be ignored) Putting all positive numbers in its regular order (1, 2, 3, ...) is a bit boring, isn't it? So here is a series of challenges around permutations (reshuffelings) of all ...
97 views

### BF Last binary digit [duplicate]

Task Your task is to write as short as possible program preferably in Brainf**k which determines the last digit of given number after it's conversion from decimal to binary system. Input An integer ...
321 views

### Terrain Reachability

Turn-based tactics games like Advance Wars, Wargroove, and Fire Emblem are made up of a square grid of varying terrain with units of differing movement classes requiring different costs for each ...
4k views

### Return the Closest Prime Number

Challenge This is a simple one: Given a positive integer up to 1,000,000, return the closest prime number. If the number itself is prime, then you should return that number; if there are two primes ...
3k views

Introduction: I saw there was only one other badminton related challenge right now. Since I play badminton myself (for the past 13 years now), I figured I'd add some badminton-related challenges. ...
22k views

### Implement the Thanos sorting algorithm

The sorting algorithm goes like this: While the list is not sorted, snap half of all items (remove them from the list). Continue until the list is sorted or only one item remains (which is sorted by ...
2k views

### Lay out the Carpet

Inspired by this SO question. Challenge: Input: A string $s$ A character $c$ Output: Create a diamond-square ASCII art of the string in all four directions, with the first character of the ...
579 views

### Next number with k fives

Challenge: Your program will take two integers n and k as input, and output the smallest integer greater than (but not equal to)...
342 views

### Counting the number of restricted forests on the Möbius ladder of length n

OEIS sequence A020872 counts the number of restricted forests on the Möbius ladder Mn. The Challenge The challenge is to write a program that takes an integer as an input ...
345 views

### Is there a smaller tautogram checker? [closed]

I got into code-golfing recently and tried to write the smallest tautogram checker. A tautogram is a sentence in which all words start with the same letter, for example: Flowers flourish from France. ...
3k views

### Greatest common substring

Create a program or function which takes a list of strings as input, and outputs the longest string that is a substring of all input strings. If there are several substrings of equal length, and no ...
170 views

### Draw these shapes [closed]

Given: a width, a height, and a set of sets of points. Output: An image where each set of points is connected and colored in (like a shape). Each shape must be a different color from all of the other ...
154 views

### Tips for golfing in Turing Machine But Way Worse

What are some tips for golfing in Turing Machine But Way Worse, a language made by MilkyWay90 and ASCII-only? Tips should be Turing Machine But Way Worse-specific and not be trivial (For examples ...
285 views

### Sub-pixel Zooming

Your task is to take a 24 BPP sRGB image and output the same image upscaled 3x into red, green, and blue subpixels. The resulting image will be made entirely of pure black, red, green, and blue pixels....
252 views

### Nearest hamming cycle period in MD5

This riddle was inspired by that thread. Consider that you are super-hacker and try to break MD5 hashing algorithm by looking for a hash collisions for a given hash string which your friend gave to ...
821 views

### Calculating total slots

Given a list of jobs, which must be done in order, with each taking a slot to do, how long will it take to perform them all if after doing a job the same job cannot be done for the next two slots (...
237 views

### Japanese Multiplication [duplicate]

There's a visual method for multiplication that is taught to Japanese schoolchildren [citation needed] that uses lines and crossings to get the answer. Image Source Your task is to implement this in ...
3k views

### Multiplicative persistence

Multiplicative Persistence Multiply all the digits in a number Repeat until you have a single digit left As explained by Numberphile: Numberphile "What's special about 277777788888899?" Numberphile ...
2k views

### The Digit Triangles

Challenge: Input: A positive integer $n$ Output: Create a list in the range $[1,n]$, and join it together to a string (i.e. $n=13$ would be the string ...
188 views

### Morse sudo-ku-de

Hehe, see what I did with the title? Anyways... Your job is to create a sudoku solver that accepts input in Morse code and creates output in Morse code. Here's the Morse code numbers for reference: <...
4k views

### Make a Bowl of Alphabet Soup

This is what we'll call a bowl of alphabet soup - a roughly circular ascii-art shape with the 26 uppercase English letters (A-Z) arranged clockwise to form the perimeter: ...
764 views

### New Order #2: Turn My Way

Introduction (may be ignored) Putting all positive numbers in its regular order (1, 2, 3, ...) is a bit boring, isn't it? So here is a series of challenges around permutations (reshuffelings) of all ...
476 views

### Offset in split text content

You will be given an ASCII text. This text may have zero, one or many appearances of a split a character (let's assume it will be the space character ) You will ...
1k views

### Output visual diagram of picture

Write a program that inputs the dimensions of a painting, the matting width, and the frame width for a framed portrait. The program should output a diagram using the symbol ...
70 views

### Does one string have the same characters as the other? [duplicate]

THE PROBLEM Your job, should you choose to accept it, is to take in two strings through any default input/output method and output a truthy or falsy value depending on whether the two string share ...
2k views

### Is this Pascal's Matrix?

In Pascal's triangle each number is the sum of the two numbers directly above it, treating empty spots as zero: By rotating the triangle, we can cut out square matrices of varying sizes and rotations ...
287 views

### Convert ASCII art numbers to integers

Inspired by this game Challenge: Given an ASCII art string representing a number, output that number. Example: ...
6k views

### 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 ...
173 views

### Find all diagonal counts in only one direction [closed]

If I need to get the number of diagonal squares in all directions: I do the following formula 2 N − 2 − |x − y| − |x + y − N − 1| The above example has 13 and ...
476 views

### Gotta Collect 'Em All

Your task here will be to write a very dumb AI capable of fetching all treasures on a map. Map The map is defined as follow: (artist-mode™-powered) Basic case: <...
101 views

### Which were the latest 13 consecutive years with the most friday 13. in total? [closed]

Shortest program wins, of course.
2k views

### Print last inputted byte

Challenge You have one string of input bytes, output the last byte in it. Rules Your submission may be a program or function outputting the last byte in the input which is either a string, stdin ...
104 views

### Sort a list of Numbers as letters [closed]

So, you have a random list (random meaning it doesn't matter what order it is in) of numbers with a length of n, where n is a positive integer smaller than 1000 and ...
364 views

### Pi Day: Determine if a list of words is correct Pilish

Background Though this is a bit late for Pi Day, I saw an article about Pilish and thought it would make a great challenge. Pilish is created by using a sequence of words where each word's length ...
3k views

### Print a physical multiplication table

Rectangles have this nice property - an $n \times m$ rectangle consists of exactly $n \times m$ characters! A.. more interesting property is that the rectangles can be aligned nicely in a ...
425 views

### ASCII Maze Compression

Challenge Design a compression algorithm specialized for compressing ASCII mazes. You will need to create both a compression algorithm and a decompression algorithm. Your score will be based on the ...
349 views

### Pólya urn flip and roll

Problem statement Pólya is playing about with his urn again and he wants you to help him calculate some probabilities. In this urn experiment Pólya has an urn which initially contains 1 red and 1 ...
264 views

### A poly-moly-holy quine. (Well, it's not, but the title's cool.)

This is an answer chaining puzzle, where each answer must add on to the last. The nth submission must output its own source code in the nth language and the n-1 languages before it. A language can ...
5k views

### It's a yearly task, alright

Given a number 1≤n≤365, output the nth day of the year in "Day-numberth Month" format. For example, given 1, you should output "1st January", without "of". The Gregorian calendar will be used and the ...
5k views

### Make a transparent 448*448 image

This is a simple challenge. The task is to write code that outputs a 448*448 square image with 100% transparency. The output should follow the standard image rules.
8k views

### Am I not good enough for you?

Background: The current Perfect Numbers challenge is rather flawed and complicated, since it asks you to output in a complex format involving the factors of the number. This is a purely decision-...
3k views

### They call me Inspector Morse

Your mission, should you choose to accept it, is to decide whether a given input string is Dot-heavy, or Dash-heavy. A string is dot-heavy when its morse representation contains more dots than dashes....
7k views

Challenge: Input: A list of distinct positive integers within the range $[1, \text{list-size}]$. Output: An integer: the amount of times the list is riffle-shuffled. For a list, this means the ...
A permutation of a set $S = \{s_1, s_2, \dotsc, s_n\}$ is a bijective function $\pi: S \to S$. For example, if $S = \{1,2,3,4\}$ then the function $\pi: x \mapsto 1 + (x + 1 \mod 4)$ is a ...