All Questions

13,382 questions
Filter by
Sorted by
Tagged with
26 views

Generate an image containing lots of random dots [closed]

Introduction I need a piece of code that is either fairly easily compliable to Windows .exe or fairly easy to be run under Windows that will accept only one parameter -- ...
• 51
83 views

CGAC2022 Day 3: $n$-dimensional Chocolate Pyramid

Part of Code Golf Advent Calendar 2022 event. See the linked meta post for details. I've got an infinite supply of $n$-dimensional chocolate for some positive integer $n$. The shape of the ...
• 38.8k
105 views

• 3,402
217 views

Fastest code: Does a list of string contains %s, %d, %f, or %r?

The aim is to create an algorithm to detect that one of the string in a small list of strings contains %s, %d, ...
• 317
56 views

Render numeric string/date/time using unicode block drawing characters [closed]

Am looking for a way to render numeric string/date/time using unicode block drawing characters like in example below. Ideally this could have been solved with a figlet font but couldn't find one. ...
2k views

Base Neutral Numbering System

It frustrates me that when you say "base 16", the 16 is in base 10. We need a base neutral way of writing down numbers when favoring a specific base would be inappropriate. How it works We ...
• 4,696
180 views

Is it a legal atomic chess move?

Background and Rules There is a variant of chess called atomic chess, which follows essentially the same rules as normal chess, except that pieces explodes other pieces around them when captured. In ...
• 9,979
2k views

Rarity of a String

Input: A string Output: The rarity of the string, as described below. To find the rarity of a string, follow the steps below. Start with 0. Subtract 3 for each E, A, T, or O in the string. Subtract 2 ...
1k views

• 1,131
2k views

"Prime" pyramid

The pyramid begins with the row 1 1. We'll call this row 1. For each subsequent row, start with the previous row and insert the current row number between every ...
• 13.3k
1k views

Traverse a rectangle's antidiagonals

There exists a bijection between the natural and rational numbers that works (approximately) like this: You create a 1-indexed 2-dimensional grid. In every field of this grid with position ...
• 313
270 views

Check if my input was 'hi whats up' without using any of those letters in your code

Write a script, program or function which takes one input of type string and outputs or returns some sort of indication wether the input string was 'hi whats up' (without the apostrophes) or not. You ...
• 117
2k views

For xor Young (15+)

A Young diagram is a rectangular binary mask whose every row and every column are sorted in descending order. It is easy to check that every rectangular binary mask can be formed by xor-ing together a ...
• 11.2k
2k views

Fractional Unicode Bars

Your program should take as input a number n that is greater than 0 and output a bar composed of n // 8 ▉ characters (U+2588), ...
• 4,504
2k views

Maximum average ord

Your task Take a list of strings as the input, and output the maximum average ord. Example Given the list ...
• 3,402
1k views

Is this substring list ambiguous?

Given a set of substrings, such as [ca, ar, car, rd], it's possible to create infinitely many strings by concatting them together. Some examples of this for the ...
• 18.4k
847 views

Counting Stripey Bracelets

A bracelet consists of a number, $\mathit{N}$, of beads connected in a loop. Each bead may be any of $\mathit{C}$ colours. Bracelets are invariant under rotation (shifting beads around the loop) ...
• 96.2k
394 views

Iterate through addition of number sequence until a single digit [closed]

Challenge: With any given number that has multiple digits, every digit in the number needs to repeatedly be summed together until the sum is a single digit number. To make things interesting, if there'...
• 87
3k views

Based off a Scratch project The pen extension in Scratch has a set pen color to () block. The () is normally a color dropdown, ...
• 1,554
1k views

Power sequence differences

Your task Given two positive integers $x$ and $d$ (such that $d<x$), output the 5th term of the $d$th difference of the sequence $n^x$ Example Let's say we are given the inputs $x=4$ ...
• 3,402
493 views

How Mondrian is your fine art collection? [closed]

For the purpose of this challenge a rectangular piece of ASCII art is Mondrian if it looks the same upside down. What does "looks the same" mean? A feature is any orthogonally connected ...
• 11.2k
2k views

Is this series of quotes valid Python?

Python string parsing has quite a few edge cases. This is a string: "a" Putting 2 strings immediately after each other implicitly concatenates them, so ...
• 4,696
2k views

Length of Binary as Base 10 [OEIS A242347]

Computers like binary. Humans like base 10. Assuming users are humans, why not find the best of both worlds? Your task is to find the first n terms in the sequence ...
• 1,047
2k views

Looking back at all the things I said ...

The look-say sequence is a sequence of lists of numbers where each element is the previous element with run length encoding. Run length encoding is the process of grouping together like elements and ...
• 91.5k
1k views

Increment, decrement, undo, peek

Write a program or function (hereafter "function") that returns or prints the source code of four new functions: Increment, decrement, undo, and peek. The initial function contains an ...
• 8,786