text stringlengths 180 608k |
|---|
[Question]
[
The following puzzle was invented by Eric Angelini in September 2007.
As mentioned in [A131744](https://oeis.org/A131744) :
>
> the sequence is defined by the property that if one writes the English
> names for the entries, replaces each letter with its rank in the
> alphabet and calculates the absolu... |
[Question]
[
The primorial \$p\_n\#\$ is the product of the first \$n\$ primes. The sequence begins \$2, 6, 30, 210, 2310\$.
A [Fortunate number](https://en.wikipedia.org/wiki/Fortunate_number), \$F\_n\$, is the smallest integer \$m > 1\$ such that \$p\_n\# + m\$ is prime. For example \$F\_7 = 19\$ as:
$$p\_7\# = 2... |
[Question]
[
The usual [correlation coefficient](https://en.wikipedia.org/wiki/Correlation_coefficient) (in 2d) measures how well a set of points can be described by a line, and if yes, its sign tells us whether we have a positive or negative correlation. But this assumes that coordinates of the points can actually... |
[Question]
[
An [arborally satisfied point set](https://en.wikipedia.org/wiki/Geometry_of_binary_search_trees#Arborally_satisfied_point_sets) is a 2D set of points such that, for any axis-aligned rectangle that can be formed using two points in the set as opposite corners, that rectangle contains or touches at leas... |
[Question]
[
A [connected](http://mathworld.wolfram.com/ConnectedGraph.html) graph is a graph that contains a path between any two vertices.
### Challenge
Build a [2-input NAND-gate] circuit that determines whether a 4-vertex graph is connected.
(A gate's 2 inputs *can* be the same input bit or other gate.)
O... |
[Question]
[
We all love horoscopes, *don't we*? But I have a serious problem in this *Horoscope App* installed on my *Smart Phone* that it only displays the icon of the Zodiac Sign for each day's horoscope. Now, I do remember my horoscope, but its hard to remember others' whose horoscope I am interested in.
# Chal... |
[Question]
[
Before reading this I suggest reading this little puzzle: <https://puzzling.stackexchange.com/questions/11408/longest-word-with-adjacent-letters-on-a-keyboard>
I want you to make a program that takes one argument, a word (only lowercase letters), and outputs "Yes" if the word can be typed with adjacent... |
[Question]
[
# Background
You have just learned what [combinatory logic](https://en.wikipedia.org/wiki/Combinatory_logic) is. Intrigued by the various combinators you spend quite a bit of time learning about them. You finally stumble upon this particular expression:
```
(S I I (S I I))
```
You notice that when tryi... |
[Question]
[
[UTF-1](https://en.wikipedia.org/wiki/UTF-1) is one of the methods to transform ISO/IEC 10646 and Unicode into a sequence of bytes. It was originally for ISO 10646.
The UTF-1 encodes every character with variable length of byte sequence, just like UTF-8 does. It was designed to avoid control codes. But... |
[Question]
[
## Challenge
Imagine a hexagonal grid as shown below. Let's call such a grid has size \$n\$ if it has \$n\$ dots on one side. The following is one of size 3:
```
- - -
- - - -
- - - - -
- - - -
- - -
```
Then, pick as many dots as possible on the grid so that no two dots are adjacent. For size 3,... |
[Question]
[
## Task
For a given base \$n \ge 3\$, find the smallest positive integer \$m\$, when written in base \$n\$ and rotated right once, equals \$2m\$. The base-\$n\$ representation of \$m\$ cannot have leading zeroes.
The corresponding OEIS sequence is [A087502](http://oeis.org/A087502), and its base-\$n\$ ... |
[Question]
[
**Introduction**
A popular word puzzle is to convert one word into another via a series of steps which replace only one letter and which always result in a valid word. For example, BAG can be converted to DOG via a path of five steps:
BAG -> BAT -> CAT -> COT -> COG -> DOG
Shorter paths also exist in t... |
[Question]
[
*Inspired by [this post](https://puzzling.stackexchange.com/q/69117) over on Puzzling. Spoilers for that puzzle are below.*
Given three positive integers as input, `(x, y, z)`, construct the inclusive range `[x, y]`, concatenate that range together, then remove `z` not-necessarily-consecutive digits to... |
[Question]
[
There is currently a meme on the internet that consist of taking a sentence, reverse the meaning and adding `n't` at the end. For example, `I am small` becomes `I am talln't`
## Challenge
For the sake of the challenge, we'll simplify this : Your task will be to detect whenever there is a negation in a ... |
[Question]
[
# My wires are all tangled!
Isn't it annoying when wires get all tangled up? Well, that just happened to me, so I'd like to to help me untangle them! For your convenience, I've disconnected them all from the device, but they're all still connected to the outlet. Your challenge is to figure out how to u... |
[Question]
[
In a far-off kingdom, a chess queen takes a daily walk across a spiral path, numbered from 1 to `n`, not caring to follow the spiral itself, but simply making queen's moves as she would on a chessboard. The queen is beloved by her subjects, and they make a note of every square she visits on her path. G... |
[Question]
[
A nonogram is a Japanese puzzle game in which the goal is to draw a black-and-white picture according to a list of contiguous regions, like so:
[](https://i.stack.imgur.com/2Xtt8.png)
Define the *nonographic magnitude* of a row... |
[Question]
[
Your task is to write a program that takes an input image and run it through edge-detection to become an output image.
The edge-detection works as follows (if unclear, see [sobel edge detection](https://en.wikipedia.org/wiki/Sobel_operator#Formulation)):
* The value for a pixel is the total brightness ... |
[Question]
[
# The Challenge
Consider the following diagram of the Fifteen Puzzle in its solved state:
```
_____________________
| | | | |
| 1 | 2 | 3 | 4 |
|____|____|____|____|
| | | | |
| 5 | 6 | 7 | 8 |
|____|____|____|____|
| | | | |
| 9 | 10 | 11 | 12 |
|____|____|... |
[Question]
[
Write a program or function that takes in a single string containing only lowercase a-z, and prints or returns a **[truthy](http://meta.codegolf.stackexchange.com/a/2194/26997)** value if the word is the **feminine** version of the thing it represents and a **[falsy](http://meta.codegolf.stackexchange.... |
[Question]
[
Here's an interesting problem I thought of the other day, which involves bits of code competing against other bits of code not just in a property that the code has, but by playing a game against those other bits of code.
Your task is to build a program that takes the current state of a Go board, and de... |
[Question]
[
# Summary
Code golf is good. [Pie is good](http://pieisgood.org). When you put the two together, only good stuff can happen.
# Specifications
In this challenge you will manage a pie shop. The user will be able to input five different commands: `list`, `count`, `buy`, `sell`, and `exit`. Here are the sp... |
[Question]
[
Create a program with the lowest amount of characters to reverse each word in a string while keeping the order of the words, as well as punctuation and capital letters, in their initial place.
By "Order of the words," I mean that each word is split by a empty space (" "), so contractions and such will ... |
[Question]
[
## Background
[**Conway's Soldiers**](https://en.wikipedia.org/wiki/Conway%27s_Soldiers) is a version of peg solitaire played on an infinite checkerboard. The board is initially full of pegs below an infinite horizontal line, and empty above it. Following the ordinary peg solitaire rules (move a peg by... |
[Question]
[
# Rules
In this challenge, I'm going to redefine the definition of "quotes" a bit.
* **Quotation marks** (AKA **quotes**) are *any identical characters* used in pairs in various writing systems to set off direct speech, a quotation, or a phrase. The pair consists of an opening quotation mark and a clos... |
[Question]
[
## Challenge
Given two strings in any default I/O format, do the following:
**NOTE: The challenge will refer to the first string as the "data" and the second referred to as the "program".**
1. Change the program to an infinite string which is just the program repeated infinitely (e.g. `10` --> `1010101... |
[Question]
[
[Scratch](https://scratch.mit.edu) is a visual programming language. For the sake of counting bytes, Scratch is usually written in scratchblocks2 syntax.
Post tips that specifically apply to Scratch or scratchblocks2.
[Answer]
## Abuse the bool type
In Scratch the true and false values are equival... |
[Question]
[
A maze is given as a matrix of 0s (walls) and 1s (walkable space) in any convenient format. Each cell is considered connected to its 4 (or fewer) orthogonal neighbours. A *connected component* is a set of walkable cells all transitively connected to each other. Your task is to identify the *cutpoints* ... |
[Question]
[
**This question already has answers here**:
[Encode an integer](/questions/139034/encode-an-integer)
(11 answers)
Closed 6 years ago.
I once saw on the xkcd fora a format for expressing numbers in an odd way. In this "factor tree" format:
* The empty string is 1.
* Concatenation represents multi... |
[Question]
[
A curve is a set of points on a square grid such that each point has exactly two neighbors in the four-neighbor neighborhood and the points form a single connected component. That is, the graph induced by the points on a grid graph is isomorphic to a single cycle. "Induced" means that two points cannot... |
[Question]
[
To simulate a zombie invasion, start with a grid of `#` and representing the map:
```
## ##
### #
## ##
# ###
# ####
```
* `#` represents land.
* represents water.
The zombies start at a point on the map...
```
## ##
### #
## %#
# ###
# ####
```
...and spread. `%` denotes land infect... |
[Question]
[
Write a program or function that given positive *n* and *m* calculates the number of valid distinct domino tilings you can fit in a *n* by *m* rectangle. This is sequence [A099390](https://oeis.org/A099390) in the *Online Encyclopedia of Integer Sequences*. You may take input in as function argument(s)... |
[Question]
[
The goal of this challenge is to write a program able to guess a word in the smallest possible number of attempts.
It is based on the concept of the Lingo TV show ([http://en.wikipedia.org/wiki/Lingo\_(U.S.\_game\_show)](http://en.wikipedia.org/wiki/Lingo_%28U.S._game_show%29)).
## Rules
Given a word l... |
[Question]
[
A problem I sometimes encounter is that when writing comments using LaTeX, the comment is too long. Today you will solve this, by writing code which, given a LaTeX math expression, will produce the shortest equivalent expression.
To define equivalent expressions, we will need to specify a (simplified) ... |
[Question]
[
## Challenge
In this challenge, you have to fill an \$M\$ x \$N\$ rectangle grid with the most \$A\$ x \$B\$ rectangle pieces possible.
Requirements:
* The sizes of the \$M\$ x \$N\$ rectangle grid is always bigger than the sizes of the \$A\$ x \$B\$ rectangle pieces. In other words, \$min(M, N) ≥ max(... |
[Question]
[
Giving a challenge involving a Star Trek reference just after May the 4th may be frowned upon, but here goes.
You, Luke, Anakin, Palpatine, Yoda and Han Solo are involved in an insane tournament of Rock, Paper, Scissor, Lizard, Spock.
The catch here is that you are only allowed to use a fixed order of ... |
[Question]
[
You are a Computer Science professor teaching the C programming language. One principle you seek to impart to the students is *modularity*. Unfortunately, past classes have tended not to get the message, submitting assignments with the entire program inside `main()`. Therefore, for this semester you ha... |
[Question]
[
# Convert a number to a sum of digits
**Not any sum:** we need the **shortest** sum
**Not any digits:** you can use only **digits of the number**
***Example***
You will be given as **input** an integer `n>0`
Let's say `n=27`. You have to express `27` as a **sum**, using **only the digits** `[2,7]`,... |
[Question]
[
[Underload](http://esolangs.org/wiki/Underload) is a stack-based semi-functional tarpit created by [ais523](https://codegolf.stackexchange.com/users/62131/ais523). I've recently been trying to golf in it, as it's a surprisingly elegant language.
What tips do you have for golfing in Underload? (One tip ... |
[Question]
[
Given a non empty finite sequence of integers, return an arithmetic subsequence of maximal length.
If there are multiple of the same maximal length, any of them can be returned.
### Definitions:
An *arithmetic* sequence is a sequence \$a(1),a(2),a(3),a(4),...\$ such that there is a constant \$c\$ such ... |
[Question]
[
Sometimes it is useful to run a math problem with multiple inputs. The goal of this challenge is to make a program that eases this task.
## Number-generating expressions
You must support 3 types of expression:
* Single number generator: Very simple, just a literal number
* Multi-number generator: A tad... |
[Question]
[
You're designing a new esoteric programming language and
one feature you've decided to add is a dynamic memory allocator. Your language specifies a special dedicated virtual address space for the user's program space. This is separate from the address space used by the memory allocator for any internal... |
[Question]
[
Or else he will huff and puff and blow your house down!
That was completely irrelevant. This challenge is actually about [Huffman coding](https://en.wikipedia.org/wiki/Huffman_coding#Compression). The gist of it is the frequency of characters in a given text is utilized to make its representation short... |
[Question]
[
# The Challenge
Implement [the Sundaram sieve](https://en.wikipedia.org/wiki/Sieve_of_Sundaram) for finding prime numbers below `n`. Take an input integer, `n`, and output the prime numbers below `n`. You can assume that `n` will always be less than or equal to one million.
---
# Sieve
1. Start with a ... |
[Question]
[
## Background
A binary [Hankel matrix](http://en.wikipedia.org/wiki/Hankel_matrix) is a matrix with constant skew-diagonals (positive sloping diagonals) containing only `0`s and `1`s. E.g. a 5x5 binary Hankel matrix looks like
```
a b c d e
b c d e f
c d e f g
d e f g h
e f g h i
```
where `a, b, c, d,... |
[Question]
[
# Courier Ception
The program must accept any string as input and output an pixel image that shows the input string in Courier. All the letters that contain a 'hole' (like `abdegopqABDPQR` etc) that is surrounded by black pixels must be also filled black.
## Input
The Program must be able to accept any... |
[Question]
[
## Challenge:
A Frog List is defined by certain rules:
1. Each frog within a Frog List has an unique positive digit `[1-9]` as id (any `0` in a list is basically an empty spot, which can mostly be ignored).
2. A Frog List will always have *exactly one* Lazy Frog. A Lazy Frog will remain at its position... |
[Question]
[
This is a Cops and Robbers challenge. For the Robbers' thread, go [here](https://codegolf.stackexchange.com/q/166340/42963).
The Cops have three tasks.
1) Pick a sequence from the [OEIS](https://oeis.org).
2) Pick a language (this is suggested to be a golflang, but doesn't have to be) that, when giv... |
[Question]
[
There is a site called ["Return True to Win"](https://alf.nu/ReturnTrue) with interesting tasks for Javascript programmers. The goal is to find arguments to a given function that force it to return true.
The following is one of the tasks:
```
function total(x) {
return (x < x) && (x == x) && (x > x);... |
[Question]
[
**Goal:** This goal to take a string and output how many contributions should be made on which days in order to display a message.
[](https://i.stack.imgur.com/nqlB5.png)
## Specification
* Input
+ Support letters plus space (i.e. `[A... |
[Question]
[
Given a string, first square it as follows:
First, write the string.
```
abcde
```
Next, write the string rotated one left.
```
abcde
bcdea
```
Keep doing this until you have written *len(string)* lines.
```
abcde
bcdea
cdeab
deabc
eabcd
```
Now, read from the string like this:
```
----+
+--+|
|+>||
|+... |
[Question]
[
**Input:**
A string only containing the following characters:
`abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789.?!` (space at the end) and two special characters (`_` and `|`)
**Output:**
Mirror the text based on the position(s) of the `_` and `|`.
`_` mirrors horizontally and `|` mir... |
[Question]
[
This is somewhat similar to [The centers of a triangle](https://codegolf.stackexchange.com/questions/11767/the-centers-of-a-triangle), but with a different point. The [Fermat Point](https://en.wikipedia.org/wiki/Fermat_point) is the point P in triangle ABC such that the value of AP + BP + CP is minimiz... |
[Question]
[
**Welcome back!** I'm excited to present the 3rd CodeBots challenge. This one has been a long time in the making. This challenge will be split up in 3 sections: the short version, the long version, and additional details.
# The Short Version
Each competitor will write a 24-command program. These bots w... |
[Question]
[
You are sick of all of the codegolf challenges. Hence you decide to write a program that will automatically golf some Python code for you. There are 3 test cases:
```
print quickSort([0,7,3,-1,8,10,57,2])
def quickSort(arr):
less = []
pivotList = []
more = []
if len(arr) <= 1:
r... |
[Question]
[
## Background
[Manufactoria](http://pleasingfungus.com/Manufactoria) is a game about programming. The player must use a form of two-dimensional programming language to complete tasks. If you've never heard of it, the easiest way to learn is to try out the first few levels of the game.
## Challenge
Your... |
[Question]
[
This question is similar to [Write a word equation solver](https://codegolf.stackexchange.com/questions/32475/write-a-word-equation-solver) by David Frank **but different in three important ways:** (1) David asked for just the first solution found, and I am asking for all the solutions. (2) I am asking... |
[Question]
[
The goal is to write a full program that emulates the Universal Machine from ICFP 2006 with the shortest code. The Universal Machine has a very simple instruction set explained [here](http://www.boundvariable.org/um-spec.txt). The emulator has to read a filename from command-line argument, and run the ... |
[Question]
[
It's me. Cave Johnson.
It's May 21st. You are working at Aperture Science, finest company on Earth, and tomorrow we're releasing Version 3.0 of our flagship windowing system (or *WindowS*): CavOS. Unfortunately, tomorrow morning, our chief competitor is releasing Version 3.0 of their *WindowS* too!
It... |
[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 7 years ago.
[Improve this quest... |
[Question]
[
It is easy to generate a fair coin using a unfair coin, but the reverse is harder to accomplish.
Your program will receive one number *X* (between 0 and 1, inclusive) as input. The input must not simply be hard-coded as a number in the middle of the source code. It must then return a single digit: a `1... |
[Question]
[
## Background
An **interval graph** ([Wikipedia](https://en.wikipedia.org/wiki/Interval_graph), [MathWorld](https://mathworld.wolfram.com/IntervalGraph.html), [GraphClasses](https://www.graphclasses.org/classes/gc_234.html)) is an undirected graph derived from a set of intervals on a line. Each vertex ... |
[Question]
[
## Input
A string S of length between 2 and 30. The only letters in the string will be `a` or `b`.
## Output
All strings within [Levenshtein](https://en.wikipedia.org/wiki/Levenshtein_distance#:%7E:text=Informally%2C%20the%20Levenshtein%20distance%20between,considered%20this%20distance%20in%201965.) di... |
[Question]
[
First, a mathematical interlude, short, and worth your while:
If `0 < a < 4`, the *logistic function* `f(x) = ax(1-x)` maps the interval [0,1] inside itself. This means that one can play the iteration game; for instance, if a=2, the initial value 0.3 becomes 0.42, then 0.4872, etc.
As the parameter `a`... |
[Question]
[
Thanks to [MD XF's recent challenge](https://codegolf.stackexchange.com/questions/125635/read-a-password), we can now read passwords in many different languages! The problem is, now we need to port our applications to mobile devices, and they do password entry a little differently.
# Challenge
* Read a... |
[Question]
[
The challenge is simplistic, given an input time ***as a string*** in any one of the following formats:
`hh`, `hh:mm` or `hh:mm:ss` with `0 ‚â§ hh ‚â§ 23`, `0 ‚â§ mm ‚â§ 59` and `0 ‚â§ ss ‚â§ 59`.
Output what time it currently is using the following symbols:
```
AA LABEL FOR CHARACTER CODE POINT ... |
[Question]
[
### Challenge
You are given an ASCII-art representation of characters on a plane as input by any reasonable method. This will only contain:
* `[a-z]` representing moveable characters. Every letter will appear on the board at most once.
* `#` representing immovable walls
* `.` representing empty space
F... |
[Question]
[
[This challenge](https://codegolf.stackexchange.com/q/75057/40695) but with a better spec.
## Spec
Your program will take a linear equation containing a single variable `x` and output the value of `x`.
### Input / Parsing
* The input will only contain numbers, operators, parenthesis (`()`), `x`, and an... |
[Question]
[
Based on [Chunky vs. Smooth Strings](https://codegolf.stackexchange.com/questions/53075/chunky-vs-smooth-strings).
Squiggles `/\_/\/\__/\/\/\/\_/\_/\` are fun to make on a keyboard when you are really bored. But not all squiggles are created equal. Some squiggles are smooth, like `\___/`, and some are ... |
[Question]
[
I love ><>, ><> is life! 2D langages are amazing!
In this challenge, you will have to say if a "fishy" road has an end,
while code-golfing.
## Definition
A fishy road is constructed with tiles, including the following ones:
```
v (go down)
> (go right)
^ (go up)
< (go left)
/ (mirror)
\ (mirror)
```
An... |
[Question]
[
Write a program that takes two integers as an input; the first can be any integer and the second is less than or equal to the number of digits in the first number. Let these numbers be `a` and `b` respectively.
The program will do the following
* Concatenate a minimal number of `1`s to the end of `a` s... |
[Question]
[
Write a program that takes in (via stdin or command line) a string with the recursive form
```
PREFIX[SUFFIXES]
```
where
* `PREFIX` may be any string of lowercase letters (a-z), including the empty string, and
* `SUFFIXES` may be any sequence of strings with the recursive form `PREFIX[SUFFIXES]` conca... |
[Question]
[
The species of geese known as *Alex A* are known for residing in triangular grids consisting of 64 cells:

(Picture taken from this [unrelated Project Euler problem](https://projecteuler.net/problem=189).)
We'll label each cell with the numbers `0` to `63`... |
[Question]
[
A [Friedman Number](https://en.wikipedia.org/wiki/Friedman_number) is a positive integer that is equal to a non-trivial expression which uses its own digits in combination with the operations +, -, \*, /, ^, parentheses and concatenation.
A Nice Friedman Number is a positive integer that is equal to a ... |
[Question]
[
This is a simple encryption method that uses PI digits to encode a message, the method is simple:
The key is just a positive integer that indicates where the window starts then:
Given a string to encrypt, containing only lowercase letters, no spaces, you take its length, then you find the Nth digit of ... |
[Question]
[
Given a list of strings, sort the list as numbers without knowing what base is used. The values of the digits are also unknown (it is possible that `'1'` > `'2'`).
Since the values of digits are unknown, use [Benford's Law](http://wikipedia.org/wiki/Benford%27s_law) (or First Digit's Law) to determine ... |
[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/24603/edit).
Closed 2 years ago.
[Improve this question](/posts/24603/edit)
... |
[Question]
[
Inspired by [xkcd](http://xkcd.com/1344/).
Your challenge is to determine whether a number would make a good combination in [the game 2048](http://git.io/2048). Your input will be a number, such as:
```
8224
```
And the output will be whether that number would make a good 2048 combo, which for this inp... |
[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/21718/edit).
Closed 1 year ago.
[Improve this question](/posts/21718/edit)
Y... |
[Question]
[
Your challenge is to interpret a circuit diagram, complete with logic gates.
[Logic gates](http://en.wikipedia.org/wiki/Logic_gate) (you don't actually need to know what these do / are to complete this challenge):
* and gate: `a`
* or gate: `o`
* nand gate: `A`
* nor gate: `O`
* xor gate: `x`
* xnor ga... |
[Question]
[
The idea is this: Write a function to print the length of time from now/today's date (at the time the function is called) until a date supplied as an argument.
**Assumptions:**
* Input date will always be tomorrow or later, in the future.
* Input date will never be more than 10 years in the future.
**R... |
[Question]
[
## Task
>
> Write a function/program which takes \$n\$ as a parameter/input and prints/returns the number of topologies (which is demonstrated below) on the set \$\{1,2,...,n\}\$.
>
>
>
## Definition of Topology
Let \$X\$ be any finite set, and assume that \$T\$, which is subset of the [power set](... |
[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 3 years ago.
[Improve this quest... |
[Question]
[
# Background
Here on CGCC, a commonly seen subgenre is [radiation-hardening](/questions/tagged/radiation-hardening "show questions tagged 'radiation-hardening'") – writing a program that works even if one character is deleted. A similar problem is studied in the field of coding theory: finding an encod... |
[Question]
[
## Challenge Statement
The goal of this challenge is to build the 5 state *Infinite Time Turing Machine* that takes the longest to halt. Since Infinite Time Turing Machines can run for infinite time your score will be a "transfinite ordinal".
That's the challenge statement, but if you don't what all th... |
[Question]
[
[Sandbox](https://codegolf.meta.stackexchange.com/a/22278/80214)
Given a boolean matrix representing my grass field, sheep length \$n\$ and wool thickness \$k\$, you will have to count my sheep.
A sheep is a single independent unbroken line of sheep length \$n\$ and thickness \$k\$.
```
#|##|# | #
#| ... |
[Question]
[
You will be given a point `(x,y)` relative to the center of the [Ulam spiral](https://en.wikipedia.org/wiki/Ulam_spiral) (the center being the point which represents one), and length `z`. The task is to check whether there exists a path from `(0,0)` to `(x,y)` of length `z`, assuming prime numbers are ... |
[Question]
[
Create three programs, which we'll call Rock, Paper, and Scissors.
Each program must be unique, and accept input.
If a program gets any input which is not one of the programs Rock, Paper or Scissors, it must print itself.
[RPS](https://en.wikipedia.org/wiki/Rock_paper_scissors) style, the programs wil... |
[Question]
[
**Background and Motivation:**
[IOC Country Codes](https://simple.wikipedia.org/wiki/List_of_IOC_country_codes) are three letter abbreviations that are commonly used when broadcasting the Olympic Games. The last two letters of some codes overlap with the first two letters of other codes (RUS -> USA, JP... |
[Question]
[
I am a big fan of the game Creeper World, and especially the sequel. You don't need to know how this game works to answer the question, I just wanted to mention where my question originated from.
In the game, your objective is to destroy the Emitters that are spawning Creeper, using a weapon known as a... |
[Question]
[
AKA: Generate Clickbait From an Array.
Given an array of integers, generate some cringe-worthy clickbait based on its arrangement and length:
* If it's 20 elements or less, you can make a Top X List. *Parameters: length of the array.*
* Prime numbers are celebrities, so anytime two of them are next to ... |
[Question]
[
I got to wondering yesterday if I could write a program to comb through a given word search and output the answers. It was actually surprisingly easy. Now I wonder just how small we can get.
# Rules
* Your first input is a string or collection of n lines, each of which is n characters long
* Your seco... |
[Question]
[
*This challenge is from an admission test to a closed number cyber security course. Anyway it doesn't have to do with cyber security, it's just to test the students logical and coding skills.*
## Task
Write a program that removes entries from an array so that the remaining values are sorted in a strict... |
[Question]
[
Your task is to, given a map as input, zoom it out or in, depending on the scale. Note that the scale given is the scale by which to zoom *out*, so a scale between 0 and 1 will actually zoom in.
For example, given the following (badly made) map:
```
..____....
../OOO\...
..\OO/\...
..........
```
And a... |
[Question]
[
The [coin change problem](http://www.algorithmist.com/index.php/Coin_Change) is very well documented. Given an infinite supply of coins of denominations `x_1` to `x_m` you need to find the number of combinations which add up to `y`. For example, given `x = {1,2,3}` and `y = 4` we have four combinations... |
[Question]
[
You've got a set of tiles with the symbols from the periodic table. Each symbol appears once. You're thinking up words to make but you want to know if it's possible or not.
## The Challenge
Write a program in your favourite language that will take in a string as an input parameter. You may assume that ... |
[Question]
[
Chess pieces (kings, queens, rooks, bishops, and knights) and pawns are on a board, but not on the [**a1**](//en.wikipedia.org/wiki/Algebraic_notation_(chess)) or **h8** square. Your task is to travel from the empty **a1** to the empty **h8** squares, passing through only empty squares. The rules of mo... |
[Question]
[
Write a program in any language that reads input from stdin and outputs a slightly modified output to stdout. The program should borrow some characters from the input and output as large of a prefix as possible of `*language-name* is awesome!` followed by a newline and then what's left of the input.
*... |
[Question]
[
To conjugate a verb in *l'imparfait*, one needs to perform the following steps:
1. Find the "stem" of the word; this is achieved by omitting the `-ons` from the nous-conjugated form of the word. For example, *vivre* is *nous vivons*; removing `-ons` from *vivons* yields `viv-`.
2. Take the stem and add... |
[Question]
[
Rod is moderating a card game between two players: George and Tim. Currently, Tim is shuffling the cards. Rod suspects that Tim is trying to cheat, so he needs your help to check that the shuffle is fair.
Tim is doing the overhanded shuffle: he cuts a pile of cards from the bottom of the deck, then cut... |
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.