text stringlengths 180 608k |
|---|
[Question]
[
# Introduction
[Nine-Ball](https://en.wikipedia.org/wiki/Nine-ball) is a popular pool game played casually and as a competitive sport.
There is one of each numbered ball, with the numbers 1 to 9.
The game starts with all 9 of the balls in a diamond shaped rack, like so:
```
1
2 3
4 9 6
5 7
8
```
... |
[Question]
[
*I need to stop thinking of punny names*
Your task is to create as many snippets (programs that have input and output built-in), functions or full programs as possible that sorts whatever your language's version of integer arrays is in ascending order, but for each program, you're only allowed to use t... |
[Question]
[
Let's try to golf this piece of ascii-art representing a golfing man:
```
'\ . . |>18>>
\ . ' . |
O>> . 'o |
\ . ... |
[Question]
[
Your challenge is to write a program that constantly prompts for input, and when input is given, output that five seconds\* later. However, your program must continue prompting for input during that time.
Since this is a bit confusing, here's a demo.
```
<pre id=x></pre><input id=h onchange='var k=this... |
[Question]
[
**UPDATE:** isSuicidal() was added to the plane class, this allows you to check if a plane is on an irreversible collision course with the walls!!
**UPDATE:** updateCoolDown() separated from simulateMove()
**UPDATE:** non-Java entry wrapper, written by [Sparr](https://codegolf.stackexchange.com/users/4... |
[Question]
[
Inspired by...
>
> [Networking - How can I work out how many IP addresses there are in a given range?](https://softwareengineering.stackexchange.com/questions/241402/how-can-i-work-out-how-many-ip-addresses-there-are-in-a-given-range)
>
>
>
Write a program or function that takes two strings as in... |
[Question]
[
## Input
* A list of between 1 and 255 positive integers (inclusive), each in the range 1 to 232 - 1 (inclusive).
* Your input format does not need to be identical to the test cases.
* Input without leading zeroes is required to be accepted.
* Input with leading zeroes is not required to be accepted.
*... |
[Question]
[
[Deadfish](http://esolangs.org/wiki/Deadfish) is a joke "programming language" with four commands. Because the Esolang page is a bit contradictory and the interpreters on that page don't all work exactly the same, you should implement the following variation:
---
## Specification
1. There is an accumul... |
[Question]
[
## Background
The Zundoko Kiyoshi function originates from [this tweet](https://twitter.com/kumiromilk/status/707437861881180160) by kumiromilk. Translated from Japanese, it reads roughly as follows:
>
> The test for my Java lecture had a problem that said "Implement and describe your own function". I... |
[Question]
[
A laser shoots a straight beam in one of the four orthogonal directions, indicated by `<>^v`. Determine whether it will hit the target `O` on a rectangular grid.
Each of these will hit (True):
```
.....
...O.
.....
...^.
.....
>O.
...
v....
O....
...........
...........
O.........<
...........
```
The... |
[Question]
[
# Challenge:
Write a function or program that accepts a list of boolean values and returns all of the ranges of True's.
# Test Cases:
```
f [F] = []
f [T] = [[0,0]]
f [T,T,F,T] = [[0,1],[3,3]]
f [F,T,T,F,F,T,T,T] ... |
[Question]
[
A three-fruit pie is made of three *different* fruits. What is the most three-fruit pies you can make from the quantities of 5 fruits you have?
For example, with
```
1 apple
1 banana
4 mangoes
2 nectarines
0 peaches
```
you can make 2 pies:
```
apple, mango, nectarine
banana, mango, nectarine
```
**... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
This question does not appear to be about code golf or coding challenges within the scope defined in the [help center](https://codegolf.stackexchange.com/help/on-topic).
Closed 7 years ago.... |
[Question]
[
Given a distance in meters as an integer \$60\le d \le 260\$, return the number of clubs that may be used according to the following arbitrary chart, where both \$min\$ and \$max\$ are inclusive:
```
club | min | max
----------------+-----+-----
Driver | 200 | 260
3-wood | ... |
[Question]
[
I was going through a bizarre thread on Reddit, and came across this:
( ͡°( ͡° ͜ʖ( ͡° ͜ʖ ͡°)ʖ ͡°) ͡°)
It's representing a group of people smiling somewhat suspiciously.
(In the challenge below though, spaces to the left of the right eyes were dropped somehow while I was writing the challenge. Note the ... |
[Question]
[
Given a list or delimited string, output a list or delimited string with the first character of each word one word later.
For this challenge, a "word" consists of only all printable ASCII characters, except the space, newline, and tab character.
For example, take the string "Good afternoon, World!" (sp... |
[Question]
[
Given *N* (2 <= *N*), print *N* lines of the letter Fibonacci series like this (i.e. *N* = 5)
First, start with `a` and `b`:
```
a
b
```
Next, add the two lines.
```
a
b
ab
```
Keep adding the last two lines.
```
a
b
ab
bab
```
Keep going...
```
a
b
ab
bab
abbab
```
And we're done.
Remember, this is [c... |
[Question]
[
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 longer substring, output any one of them.
* This may mean outputting the empty string.
* If there are s... |
[Question]
[
The [Stern-Brocot sequence](https://en.wikipedia.org/wiki/Stern%E2%80%93Brocot_tree) is a Fibonnaci-like sequence which can be constructed as follows:
1. Initialise the sequence with `s(1) = s(2) = 1`
2. Set counter `n = 1`
3. Append `s(n) + s(n+1)` to the sequence
4. Append `s(n+1)` to the sequence
5.... |
[Question]
[
**This was inspired by *Problem 13 - Non-Repeating Binary* of [HP CodeWars' recent competition.](http://www.hpcodewars.org/past/cw18/problems/HPCodeWars2015ProblemSet.pdf)**
Let's take a random decimal number, say
```
727429805944311
```
and look at its binary representation:
```
1010010101100101111111... |
[Question]
[
Inspired by @emanresu A's [*Is it a fibonacci-like sequence?*](https://codegolf.stackexchange.com/q/242935/9288) Make sure to upvote that challenge as well!
We say a sequence is Fibonacci-like, if, starting from the third term (\$1\$-indexed), each term is the sum of the previous two terms. For example... |
[Question]
[
This is the Grid Game:
[](https://i.stack.imgur.com/uU3ho.png)
It's a game based on cellular automata, where the aim is to remove all of the pieces belonging to your opponent.
How it works:
* There are two kinds of piece in the game, cities and ... |
[Question]
[
Given an input of a color in `#rrggbb` hex format, output its RGB complement in
the same format.
The RGB complement R2G2B2 of any color
R1G1B1 is defined as the color with
R2 value *255 - R1*, B2 value *255 -
B1*, and G2 value *255 - G1*.
Hex digits may be either in uppercase (#FFAA20) or lowercase (#f... |
[Question]
[
My little kid has a toy like this:
[](https://i.stack.imgur.com/lghyLm.jpg)
This toy consists of 10 stackable little buckets, that we are going to number from 1 (the smallest one) to 10 (the biggest one). Sometimes he makes small piles and the toy ends up... |
[Question]
[
A standard [Scrabble](https://en.wikipedia.org/wiki/Scrabble) board is a 15×15 grid of spaces to place letter tiles. Most of the spaces are blank but some are double word scores (pink), triple word scores (red), double letter scores (light blue), and triple letter scores (blue). There is usually a star... |
[Question]
[
Well, sum it down really.
Write a program or function that takes in a nonempty list of decimal integers (0-9) and outputs a downward pointing "triangle" of digits with the input list at the top where every digit after the first line is the sum of the two digits above it modulo 10.
For example, the inpu... |
[Question]
[
Write the shortest program that takes a single integer as input and prints out a [Suanpan abacus](http://en.wikipedia.org/wiki/Suanpan)
Testcases
Input:
```
314159
```
Output:
```
|\======================================/|
|| (__) (__) (__) (__) (__) (__) ||
|| (__) (__) (__) (__) || ||... |
[Question]
[
Consider a potentially self-intersecting polygon, defined by a list of vertices in 2D space. E.g.
```
{{0, 0}, {5, 0}, {5, 4}, {1, 4}, {1, 2}, {3, 2}, {3, 3}, {2, 3}, {2, 1}, {4, 1}, {4, 5}, {0, 5}}
```
There are several ways to define the area of such a polygon, but the most interesting one is the eve... |
[Question]
[
**The Situation:**
Several (`M`) dwarves have found a goblin's chest with `N` gold coins and have to divide them. Due to ancient rules governing the allocation of loot to pirates in order of seniority, the oldest dwarf should get one coin more than the next oldest dwarf, and so on, so that the youngest... |
[Question]
[
[Sandbox](https://codegolf.meta.stackexchange.com/a/18348/82007)
There are special sets *S* of primes such that \$\sum\limits\_{p\in S}\frac1{p-1}=1\$. In this challenge, your goal is to find the largest possible set of primes that satisfies this condition.
**Input**: None
**Output**: A set of primes w... |
[Question]
[
Yes, how *much*, not how many...
As we all know, a large present is far better than a small one. Therefore, the value of the presents should always be measured in total volume, not number of presents, weight, or even combined price.
As it's frowned upon to compare the amount of presents one gets, you ... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
Questions without an **objective primary winning criterion** are off-topic, as they make it impossible to indisputably decide which entry should win.
Closed 6 years ago.
[Improve this quest... |
[Question]
[
Write a function that takes 4 points on the plane as input and returns true iff the 4 points form a square. The points will have integral coordinates with absolute values < 1000.
You may use any reasonable representation of the 4 points as input. The points are not provided in any particular order.
Sho... |
[Question]
[
*Inspired by [this video](https://www.youtube.com/watch?v=wdgULBpRoXk) by Ben Eater. This challenge forms a pair with [Encode USB packets](https://codegolf.stackexchange.com/q/229504).*
The USB 2.0 protocol uses, at a low level, a line code called [**non-return-to-zero**](https://en.wikipedia.org/wiki/... |
[Question]
[
Figuring out whether a given number is prime, while not very complicated, is kind of hard. But making a guess doesn't need to be.
Seeing whether a number is a multiple of 2 or 5 is easy - you can just look at the last digit. Multiples of 3 isn't much harder, just add up the digits and see if you end up... |
[Question]
[
I was messing around with infinite resistor networks (long story) when I came across the following interesting recursive pattern:
```
|-||
|---
```
Each instance of this pattern is twice as wide as it is tall. To go from one level of the pattern to the next, you break up this rectangle into two sub-blo... |
[Question]
[
[Minesweeper](https://en.wikipedia.org/wiki/Minesweeper_(video_game)) is a puzzle game where mines are hidden around a board of nondescript tiles with the goal of identifying the location of all mines. Clicking on a mine loses the game, but clicking on any other tile will reveal a number from 0-8 which... |
[Question]
[
There's a minigame in Super Mario 3D World known as the *Lucky House*. It consists of a slot machine with 4 blocks.
[](https://i.stack.imgur.com/dKGVQ.jpg)
Each block may be one of 5 different icons (Flower, Leaf, Bell, Cherry or Boomerang) and the goa... |
[Question]
[
The matrix tornado is just like any other tornado: it consists of things rotating around a center. In this case, elements of the matrix instead of air.
Here is an example of a matrix tornado:
[](https://i.stack.imgur.com/e7ymY.jpg)
First w... |
[Question]
[
## Input:
A list of integers
## Output:
Put each digit (and the minus sign) in its own lane, in the order `-0123456789`, ignoring any duplicated digits.
## Example:
Input: `[1,729,4728510,-3832,748129321,89842,-938744,0,11111]`
Output:
```
-0123456789 <- Added as clarification only, it's not part of t... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
Questions without an **objective primary winning criterion** are off-topic, as they make it impossible to indisputably decide which entry should win.
Closed 9 years ago.
[Improve this quest... |
[Question]
[
Write an \$n\$-bytes program \$AB\$ such that:
* it outputs an integer \$x,\ 0\lt x\lt n\$;
* both its \$x\$-byte prefix \$A\$ and \$(n-x)\$-byte suffix \$B\$, when run as programs, output \$AB\$.
\$A, B\$ and \$AB\$ should:
* run in the same language
* not take any input
* use the same output method
T... |
[Question]
[
## Background
Entombed is an Atari 2600 game released in 1982, with the goal of navigating through a continuous mirrored maze as it scrolls upwards. In recent times, the game [has been subject to research](https://programming-journal.org/2019/3/4/) — despite the strict hardware limitations of the Atari... |
[Question]
[
## Objective
*From [Wikipedia](http://en.wikipedia.org/wiki/Recursive_acronym) :*
>
> A recursive acronym is an acronym that refers to itself in the expression for which it stands.
>
>
>
Your goal is to check if a string is a recursive acronym.
* The acronym is the first word
* Words are not cas... |
[Question]
[
Lets define the process of crushing an array of numbers. In a crush we read the array left to right. If at a point we encounter two of the same element in a row we remove the first one and double the second one. For example here is the process of crushing the following array
```
[5,2,2,3]
^
[5,2,2,3]
... |
[Question]
[
Earlier this week, we learned about how to [format esoteric languages](https://codegolf.stackexchange.com/questions/92776/esolang-comment-template-generator) for commenting. Today, we're going to do the inverse of that. I need you to write a program or function that parses some well-commented esoteric ... |
[Question]
[
A [Flow Snake, also known as a Gosper curve](https://en.wikipedia.org/wiki/Gosper_curve), is a fractal curve, growing exponentially in size with each order/iteration of a simple process. Below are the details about the construction and a few examples for various orders:
*Order 1 Flow Snake*:
```
____
\... |
[Question]
[
Write a program which calculates if an inputted monetary value, as an integer, can be represented by a unique combination of coins and/or notes, that meaning the same coin/note cannot be used more than once.
Your program should take a value as input, and can take a list of coin/note values either via i... |
[Question]
[
Let's use the four basic operations, addition `+`, multiplication `*`, subtraction `-` and division `/` (float, not integer).
***Stewie's sequence*** is defined as follows:
```
x = [x(1), x(2)] // Two initial numbers (one indexed)
x(3) = x(1) + x(2)
x(4) = x(2) * x(3)
x(5) = x(3) - x(4)
x(6) = x(4) ... |
[Question]
[
*Disclaimer: ModTen is a fictional card game which was created for the sole purpose of this challenge.*
## The rules of ModTen
*ModTen* is played with a standard 52-card deck. Because the full rules are yet to be invented, we're going to focus on the hand ranking exclusively.
[):
>
> If \$A\$ is any positive integer having \$m\$ digits, there exists a positive integer \$N\$ such that the first \$m\$ digits of \$N!\$ constitute the integer \$A\$.
>
>
>
### Challenge
You... |
[Question]
[
The goal of this code golf is to create an interpreter for the programming language [HQ9+](http://esolangs.org/wiki/HQ9%2B)
There are 4 commands in this programming language:
* **H** - prints "Hello, world!"
* **Q** - prints the source code of the program
* **9** - prints the lyrics of the song ["99 ... |
[Question]
[
The goal of this challenge is to generalise the bitwise XOR function to other bases. Given two non-negative integers \$ x \$ and \$ y \$, and another integer \$ b \$ such that \$ b \geq 2 \$, write a program/function which computes the generalised XOR, described the following algorithm:
1. First, find ... |
[Question]
[
The leaders of the world have met and have finally admitted that the best (and only) way of resolving global economic woes is to take stock of how much they owe each other and just pay each other off with huge cheques. They have hired you (ironically, at the lowest contract rate possible) to work out t... |
[Question]
[
At the opening scene of the *Dark Knight rises*, there is a rather [awkward dialogue](http://knowyourmeme.com/memes/baneposting) between a CIA agent and the villain Bane.
>
> **CIA agent:** “If I pull that [mask] off, will you die?”
>
>
> **Bane:** “It would be extremely painful…”
>
>
> **CIA agen... |
[Question]
[
# Introduction
Some months are **completely symmetric**, meaning they have *central symmetry* as well as *reflection symmetry*, like `February of 2010`:
```
February 2010
┌──┬──┬──┬──┬──┬──┬──┐
│ │ │ │ │ │ │ │
├──┼──┼──┼──┼──┼──┼──┤
│ │ │ │ │ │ │ │
├──┼──┼──┼──┼──┼──┼──┤
│ │ │... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
This question does not appear to be about code golf or coding challenges within the scope defined in the [help center](https://codegolf.stackexchange.com/help/on-topic).
Closed 7 years ago.... |
[Question]
[
# The Challenge
A simple "spy versus spy" challenge.
Write a program with the following specifications:
1. The program may be written in any language but must not exceed 512 characters (as represented in a code block on this site).
2. The program must accept 5 signed 32-bit integers as inputs. It can t... |
[Question]
[
I need to prepare digits made of cardboard to display some number ([example](https://i.stack.imgur.com/eWidM.jpg)). I don't know beforehand which number I should display - the only thing I know is that it's not greater than `n`.
How many cardboard digits should I prepare?
Example: `n = 50`
To display a... |
[Question]
[
In [this simple but fun challenge](https://codegolf.stackexchange.com/questions/187586/will-jimmy-fall-off-his-platform), you were asked to determine if Jimmy would fall of their platform. Jimmy has three body parts `/`, `o`, and `\` arranged like this
```
/o\
```
Platforms are represented with `-`. Ji... |
[Question]
[
As you probably know, a Fibonacci Number is one which is the sum of the previous two numbers in the series.
A Fibonacci Digit™ is one which is the sum of the two previous *digits*.
For instance, for the series beginning `1,1`, the series would be `1,1,2,3,5,8,13,4,7,11,2...` The change occurs after the... |
[Question]
[
You are given a matrix of forward and back slashes, for instance:
```
//\\
\//\
//\/
```
A slash cuts along the diagonal of its cell corner-to-corner, splitting it in two pieces.
Pieces from adjacent (horizontally or vertically) cells are glued together.
Your task is to count the number of resulting pi... |
[Question]
[
# Primes are everywhere...
they hide inside Pi
3.141592653**58979**3238**462643**3832**795028841**971693993751
Let's get those primes!
# The Challenge
Given as input an integer `n>0`, find out how many primes are hidden inside the first `n` digits of `Pi`
# Examples
For `n=3` we should search for prime... |
[Question]
[
# Overview
Some of you might be aware of the [Kolakoski Sequence](https://en.wikipedia.org/wiki/Kolakoski_sequence) ([A000002](http://oeis.org/A000002)), a well know self-referential sequence that has the following property:
[](h... |
[Question]
[
# **Balancing Act**
**Overview**
Given an input of 3 single-digit positive integers representing a set of weights, output an ASCII representation of a seesaw with the weights placed on it so that it is in balance around a central pivot, taking lever effects into account.
Each number has a weight equal ... |
[Question]
[
In schools across the world, children type a number into their LCD calculator, turn it upside down and erupt into laughter after creating the word 'Boobies'. Of course, this is the most popular word, but there are many other words which can be produced.
All words must be less than 10 letters long, how... |
[Question]
[
Until [decimalization in 1971](http://en.wikipedia.org/wiki/Decimal_Day), British money was based on dividing the [pound](http://en.wikipedia.org/wiki/Pound_sterling) into 240 pennies. A shilling was 12 pennies so 20 shillings made a pound. The smallest denomination was the farthing at one fourth of a ... |
[Question]
[
# Challenge
For this challenge, a mountainous string is one that conforms to the grammar rule `M: x(Mx)*` where at each production, the all x's are the same character. When indented, a mountainous string might look something like this:
```
A
B
C
D
C
E
F
E
C
B
A
```
As you can see, ... |
[Question]
[
A well known [song](https://www.youtube.com/watch?v=98W9QuMq-2k) by the Irish rock band [U2](https://en.wikipedia.org/wiki/U2) starts with the singer Bono saying "1, 2, 3, 14" in Spanish ("*uno, dos, tres, catorce*").
There are [various](http://forum.atu2.com/index.php?topic=4695.30) [theories](https:/... |
[Question]
[
We all know of, or at least have heard of, **[brainfuck](http://esolangs.org/wiki/brainfuck)**, one of the most famous and influential esoteric languages. While these days most implementations use an infinite tape, the original compiler by Urban Müller had a tape of 30000 cells. A little known fact\* i... |
[Question]
[
What better problem for PCG.SE than to implement [PCG, A Better Random Number Generator](http://www.pcg-random.org/)? This new [paper](http://www.pcg-random.org/pdf/toms-oneill-pcg-family.pdf) claims to present a fast, hard-to-predict, small, statistically optimal random number generator.
Its minimal C... |
[Question]
[
### Introduction
Everyone knows the game tic-tac-toe, but in this challenge, we are going to introduce a little twist. We are only going to use **crosses**. The first person who places three crosses in a row loses. An interesting fact is that the maximum amount of crosses before someone loses, is equal... |
[Question]
[
It is in my humble opinion that standard text is boring. Therefore I propose a new writing standard, walking words!
### Walking words
Walking words are words which will respond to certain characters. For the purpose of this challenge the trigger characters are `[u, d, r, l]` from `up down right left`.
... |
[Question]
[
# Introduction
My grandpa is a fan of James Bond, but he is always unsure on how to rank his favourite actors. As such, he is always making lists, which is a lot of work. He asked me to produce a program that will make his life easier, but I do not have time for that, I have to work! So I will count on... |
[Question]
[
**A [Latin square](https://en.wikipedia.org/wiki/Latin_square) is a square that has no repeated symbols in the rows or columns:**.
```
13420
21304
32041
04213
40132
```
And as many Sudoku players know, you don't need all of the numbers to deduce the remaining numbers.
**Your challenge is to compress a... |
[Question]
[
>
> **Note**: Anders Kaseorg warns me that this could be a duplicate of [another previous question](https://codegolf.stackexchange.com/q/53760/70347). It seems so, and I'm sorry I did not find that question before posting this one. Nonetheless, that question only received one answer and this one is si... |
[Question]
[
N children, with no two sharing their exact size, are lined up in some order. Each can only compare heights with their immediate neighbours. When the teacher shouts "raise hands if you are the tallest", they do so if they are taller than both their neighbours, and they do so simultaneously. If only one... |
[Question]
[
## A Brainfuck derivative
Let's define a simple [Brainfuck](https://en.wikipedia.org/wiki/Brainfuck)-like programming language.
It has a two-directional tape of cells, and each cell holds one bit.
All bits are initially 0.
There is a moving head on the tape, initially at position 0.
A program is a stri... |
[Question]
[
(This is my first code-golf question)
When I was a child, my dad and I invented a game where the license plate we see on cars can give certain points based on some rather simple rules:
X amount of the same letter or number give X-1 points, examples:
```
22 = 1 point
aa = 1 point
5555 = 3 points
```
The... |
[Question]
[
*In the spirit of [Patch the Image](https://codegolf.stackexchange.com/q/70483/42963), here's a similar challenge but with text.*
## Challenge
Bit rot has afflicted your precious text! Given a paragraph composed of ASCII characters, with a rectangular hole somewhere in it, your program should try to fi... |
[Question]
[
# Sort the Textbooks
School is starting soon (if it hasn't already) and so it's time to get our textbooks in order. You need to sort your books in alphabetical order but that takes too long so you decide to write a program to do it.
### Examples
**Input:**
```
_
| | _
|F| | |
|o|_|P|
|o|B|P|
| |a|C|
... |
[Question]
[
**Closed**. This question is [opinion-based](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Update the question so it can be answered with facts and citations by [editing this post](/posts/2070/edit).
Closed 7 years ago.
[Improve this question... |
[Question]
[
My parents-in-law have a fishpond in their yard, filled with koi. It didn't really cross my mind until I noticed the following extract from my code.
`',') & '_'`
... I had fish-faces looking back at me from my screen...
Which has given me a great idea...
My quest for you, my dear golfers is to create a... |
[Question]
[
You are responsible for building a new freeway. However, it leads through
mountainous lands and therefore needs numerous bridges and tunnels. The
freeway itself should stay at a single level.
**Input**
You are given a rough ASCII description of how the mountains look like on
standard input, such as t... |
[Question]
[
The trees we are growing have some rules that define how they grow:
## Growth Rules:
1. Trees consist only of branches.
2. Branches are made up of a combination of the following symbols: `_`, `\`, `|`, `/`, & `_`
3. A tree starts as a single vertical branch/trunk (`|`) on the ground (`_`):
`___________... |
[Question]
[
The purpose of this challenge is to determine if a collection of one-dimensonal pieces can be tiled to form a finite continuous chunk.
A **piece** is a non-empty, finite sequence of zeros and ones that starts and ends with a one. Some possible pieces are `1`, `101`, `1111`, `1100101`.
**Tiling** means ... |
[Question]
[
# Where is the Arrow Pointing?
In this challenge, your goal is to follow an arrow and output the character it is pointing to.
## Examples
**Input:**
```
d S------+ b
|
|
c +--->a
```
**Output:** `a`
---
**Input:**
```
S-----+---a->c
|
V ... |
[Question]
[
A move sequence is a sequence of moves (turns) on a Rubik's Cube (for the notation look down below). Beside the empty move sequence, there are many other other move sequences, that have no effect on the cube at all. We call these move sequences identity sequences.
Some of these identity sequences are ... |
[Question]
[
[Nontransitive dice](http://en.wikipedia.org/wiki/Nontransitive_dice) are nice little toys that defy our intuition in probability theory. We'll need a few definitions for this challenge:
Consider two dice *A* and *B* which are thrown at the same time. We say that *A* **beats** *B* if the probability of... |
[Question]
[
(I'm not a chemist! I might be wrong at some stuff, I'm writing what I've learned in high-school)
Carbon atoms have a special attribute: They can bind to 4 other atoms (which is not that special) and they stay stable even in long chains, which is very unique. Because they can be chained and combined in... |
[Question]
[
# The puzzle:
Consider a console/hand-held game with a d-pad where you are required to enter a name of sorts. This appeared in many older games before the use of QWERTY was popularised in consoles (e.g. I believe the Wii uses a QWERTY keyboard layout for input). Typically, the on-screen keyboard looks ... |
[Question]
[
Your task is to assemble the integers from `1` to `N` (given as input) into a rectangle of width `W` and height `H` (also given as input). Individual numbers may be rotated by any multiple of 90 degrees, but they must appear as contiguous blocks in the rectangle. That is, you cannot break one of the nu... |
[Question]
[
>
> Holy wars have been fought over spaces vs. tabs. (And of course spaces, being
> objectively superior, won.) —[Alex A.](http://chat.stackexchange.com/transcript/message/23907461#23907461)
>
>
>
**S**ome peo**p**le [still refuse](https://codegolf.stackexchange.com/questions/57963/overcoming-clus... |
[Question]
[
A [comment I made in chat](http://chat.stackexchange.com/transcript/message/20243968#20243968) and the ensuing conversation inspired me to make this challenge.
>
> *Am I the only one referred to by initials around here? We are all about golfing things down. We can have MB and D-nob and ... O.*
>
>
>... |
[Question]
[
Many languages allow strings to be "added" with `+`. However this is really concatenation, a *true* addition would follow the group axioms:
* It is closed (the addition of any two strings is always a string)
* It is associative ( \$\forall a b . (a + b) + c = a + (b + c)\$)
* There is an identity (\$\e... |
[Question]
[
# Challenge description
**Dominoes** is a game played with tiles with two values on it - one on the left, one on the right, for example `[2|4]` or `[4|5]`. Two tiles can be joined together if they contain a common value. The two tiles above can be joined like this:
`[2|4][4|5]`
We'll call a sequence of... |
[Question]
[
[*Super Mario Galaxy*](https://www.mariowiki.com/Super_Mario_Galaxy) features two [rhombicuboctahedron](https://en.wikipedia.org/wiki/Rhombicuboctahedron)-shaped\* planets tiled with platforms that shrink as Mario runs across. Should Mario fall into a triangular hole or a gap left by a tile he previous... |
[Question]
[
While bored in high-school (when I was half my current age...), I found that \$f(x) = x^{x^{-1}}\$ had some interesting properties, including e.g. that the maximum \$f\$ for \$0 ‚â§ x\$ is \$f(e)\$, and that the [binding energy per nucleon](https://commons.wikimedia.org/wiki/File:Binding_energy_curve_-... |
[Question]
[
**Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/2823/edit).
Closed 2 years ago.
[Improve this question](/posts/2823/edit)
Wr... |
[Question]
[
# Task
Given one non-whitespace printable character, make a 3x3 square representation of that input. For example, if the input is `#`, then the output is:
```
###
# #
###
```
# Rules
* The output format is strict, although a trailing newline is allowed. It means that the space in the middle is required... |
Subsets and Splits
Python Q&A Count
Counts the number of questions and answers related to Python in the dataset, providing insight into the prevalence of Python content.