text stringlengths 180 608k |
|---|
[Question]
[
Invert the Format method.
The `Format` method of the String class (or equivallent, such as `sprintf`) is available in most languages. It basically takes a "Format" string which may contain placeholders with some extra formatting, and zero or more values to be inserted instead of those placeholders.
You... |
[Question]
[
At <http://shakespeare.mit.edu/> you can find the full text of each of Shakespeare's plays on one page (e.g. [Hamlet](http://shakespeare.mit.edu/hamlet/full.html)).
Write a script that takes in the url of a play from stdin, such as <http://shakespeare.mit.edu/hamlet/full.html>, and outputs the number o... |
[Question]
[
Given a list of chords label them as either 'Major' or ' Minor'.
## Input
Input will be a list of chords, one per line, made up of 3 notes separated by a space. Each note will consist of the note name in uppercase (`A`-`G`) and an optional accidental (`#` or `b`). Chords may be in any inversion (i.e. t... |
[Question]
[
["Y.M.C.A."](https://www.youtube.com/watch?v=CS9OO0S5w2k) is a popular disco song by the Village People that has a [well-known dance](https://en.wikipedia.org/wiki/Y.M.C.A._%28song%29#Origin_of_hand_movement_and_dance). Write the shortest program to output the capital letters "Y", "M", "C", and "A" syn... |
[Question]
[
There's a payment machine for laundry in my building which does a few frustrating things. The ones relevant to this challenge are:
* It doesn't make change. So if you pay over the amount then you are not getting that over-payment back.
* It doesn't accept coins smaller than 20c. Meaning the only coins ... |
[Question]
[
## Task
Given a winning Wordle play results (clues), the target ("secret") word and a list of words, output a possible sequence of words leading to such results.
The words in the list will be distinct and so should be the output.
You may assume that for given inputs a solution exists. If there is more ... |
[Question]
[
# Challenge
Given a matrix of positive integers, determine if there are any "rings" of mountains. The formal definition for this challenge is: given a matrix of positive integers, is there any positive integer `n` for which there is a closed ring of cells in the matrix that are strictly greater than `n... |
[Question]
[
In this challenge, you need to find a specific pixel within an photograph (taken with a real camera).
You are passed an (R, G, B) tuple and an image, and **you need to return a point (x,y) within the image that matches the RGB color given**. The image may have multiple points that match the color; you ... |
[Question]
[
Automatic house building nanobots have been fabricated, and it's your job to code them.
Here is the house created by input `7 4 2`
```
/-----/|
/ / |
|-----| |
| | |
| | /
|_____|/
```
The input is a string containing the house's dimensions.
`7` is the width.
```
|_____|
---7---
```
`4... |
[Question]
[
**Task**
The task is to golf a real-time exact string matching algorithm of your choice.
**Input**
Two lines of text supplied on standard input, separated by a new line. The first line contains the "pattern" and will simply be an ASCII string drawn from the letters `a-z`.
The second line contains the l... |
[Question]
[
*Idea thanks to @MartinBüttner from a discussion in chat*
[Mahjong](https://en.wikipedia.org/wiki/Mahjong) is a tile game that is immensely popular in Asia. It is typically played with four players, and the goal of the game is to be the first person to complete a valid hand using the tiles. For this ch... |
[Question]
[
Given a non-empty list **L** of integers greater than **1**, we define **d(L)** as the smallest positive integer such that **n + d(L)** is [composite](https://en.wikipedia.org/wiki/Composite_number) for each **n** in **L**.
We define the sequence **an** as:
* **a0 = 2**
* **ai+1** is the smallest integ... |
[Question]
[
>
> This post is loosely inspired by [this mathoverflow post](https://mathoverflow.net/q/289810/119216).
>
>
>
A Vanisher is any pattern in Conway's Game of life that completely disappears after one step. For example the following pattern is a size 9 Vanisher.
[ ^ sqrt sin cos tan`... |
[Question]
[
Let's imagine we have a finite set of positive integers. This set can be represented as a line of dots where each integer present in the set is filled in like a scantron or [punch card](https://en.wikipedia.org/wiki/Punched_card). For example the set `{1,3,4,6}` could be represented as:
```
*.**.*
```
... |
[Question]
[
I think it's easiest to explain this challenge in a sequential manner. Start with an input number \$N\$ and:
1. Find its highest prime factor
2. Check numbers above and below \$N\$ and see if the highest prime factor is higher (i.e. the highest prime factor of \$N-1\$ and/or \$N+1\$ is higher than the ... |
[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 last year.
[... |
[Question]
[
Create a deterministic program to play nd tic-tac-toe with the other contestants.
Your program should work when `n` (width) and `d` (dimension number) are in these ranges:
```
n∈[3,∞)∩ℕ ie a natural number greater than 2
d∈[2,∞)∩ℕ ie a natural number greater than 1
```
`n = 3; d = 2` (32 ie 3 by 3):... |
[Question]
[
Remove one stick and output the stack updated.
# Description
You can remove only sticks on top( completely drawn).
You can assume:
* there are 5 sticks on the table.
* there's one and only one stick you can remove.
* sticks are recognizable : there aren't overlapping sticks on the same orientation and ... |
[Question]
[
Your task is to program a mathematical function \$s\$, that takes a nonempty finite set \$A\$ of points in the 2D plane, and outputs an uncircularity score \$s(A)\$ that satisfies following properties:
1. *Positive Definiteness*: If there is a circle or a straight line that contains all points of \$A\$... |
[Question]
[
It's the election! The area which we are in implements the system of voting called **instant runoff** (sometimes called **alternative vote** or **preferential voting**). Each voter orders each candidate from most preferred to least preferred, marking a "1" for their most preferred candidate,
a "2" for ... |
[Question]
[
Write a program or function which, given an input string and a standard deviation `σ`, outputs that string along the normal distribution curve with mean `0` and standard deviation `σ`.
### Normal distribution curve
The `y` coordinate of each character `c` is:
[. It is about bullets fired from a gun once per second at varying speeds that travel in a straight line forever. When one bullet hits another, both are ... |
[Question]
[
In this challenge, you must display ASCII art of a water balloon given the
amount of water that the balloon is filled with:
```
| __||__ |
| / # #\ |
| |######| |
| |######| |
| |######| |
| |######| |
| |######| |
| \######/ |
| |
| |
+----------+
```
## How to draw the balloon
T... |
[Question]
[
Your mission, should you choose to accept it, is to **add** the **minimum** number of parentheses, braces, and brackets to make a given string (containing only parentheses, braces, and brackets) have correct brace matching. **Ties of symbols added** must be broken by having the **maximum** distance bet... |
[Question]
[
You have an input array of size m\*n. Each cell in the array is populated with either P or T. The only operation you can do on the array is flip columns. When you flip a column, the letters in all the cells of that column switch (P becomes T and viceversa). If you have 'x' number of rows with same lett... |
[Question]
[
**This question already has answers here**:
[Fix the Braces, etc](/questions/50873/fix-the-braces-etc)
(3 answers)
Closed 7 years ago.
Consider the alphabet **A** =`"()[]{}<>"`. Think of the characters in the alphabet as opening and closing brackets of 4 different types. Let's say that a string ... |
[Question]
[
As an exercise, I've created a simple solution for [this](https://codegolf.stackexchange.com/questions/15882/generate-alphabet-with-4-copies-of-each-letter) challenge, in x86 Assembly Language. I'm running this with FASM on Windows. Here's my source code:
```
format PE console
entry start
include 'WIN3... |
[Question]
[
You are the best and most famous hero of the area. Lately there have been rumors that a [Hydra](https://en.wikipedia.org/wiki/Lernaean_Hydra) has been hanging out in a nearby ravine. Being the brave and virtuous hero that you are you figure you'll go check it out sometime later today.
The problem with ... |
[Question]
[
Draw a simple ASCII art image containing a straight line.
It's similar to [this](https://codegolf.stackexchange.com/questions/1262/ascii-art-bresenham-line-drawing) and [this](https://codegolf.stackexchange.com/questions/114980/straight-line-to-text) but with different specifications.
**Input**
You can... |
[Question]
[
>
> ~~This challenge carries a [bounty of 200 points](https://codegolf.meta.stackexchange.com/a/12124/8927) for the first to answer and remain unbeaten for at least 3 days.~~ Claimed by [user3080953](https://codegolf.stackexchange.com/a/117124/8927).
>
>
>
There's a lot of talk lately about end-to-... |
[Question]
[
Your goal is to write some code that will output the shortest unique decimal sequence for the input fraction. No two fractions with the same denominator may have the same output, although it's possible for fractions with different denominators to have the same representation.
Take **2 integers** as inp... |
[Question]
[
I don't know about you all but I'm *not* preparing for Halloween––never did never will––but, my neighbor is, so we'll help her out.
She needs help figuring out which brand of candy she has, but she has so much candy she would not be able to finish before Halloween.
She has:
* Snickers
* KitKat
* Starbu... |
[Question]
[
You have been hired as a research assistant, and asked to create a small program
that will build rat mazes. The rat box is always 62x22 and has an entrance (a)
and exit (A) for the rat, like this (input 1):
```
#######a######################################################
# ... |
[Question]
[
[According to legend](https://i.stack.imgur.com/ftMZn.jpg), almost everyone is outgolfed by [Dennis](https://codegolf.stackexchange.com/users/12012/dennis). If not, they will be.
Now I'm curious if I'm one of those 'almost everyone'.
You will be given a link to an answer in the format of `https://codeg... |
[Question]
[
## Meta-background
This was set as a [question on Puzzling](https://puzzling.stackexchange.com/q/8248/34514), and the instant reaction was "well, someone will just solve that by computer". There was a debate about just how complex a program to solve this would have to be. Well, "how complex does this p... |
[Question]
[
I am shamelessly posting a request for something I would actually find useful. The task is to take an arbitrary ascii box drawing like this
```
|
+----+----+
| state A +---+
+---------+ |
|
+----v----+
| state B |
+---------+
```
... and turn it into some... |
[Question]
[
In [my previous challenge](https://codegolf.stackexchange.com/q/70017/3808), I
drew the first diagram mostly by hand (with the help of vim's visual block
mode). But surely there must be a better way...
---
Given an input of two dimensions, a width and a height, output a hexagonal grid
with those dimens... |
[Question]
[
# Introduction
There is an Apple tree trunk positioned between -2 to 2 on the x-axis, where some apples fall down around it:
```
| |
| |
<-------|---|------->
-2 2
```
Everyday, *n* apples fall down. Each apple maintains its *x coordinate* as falls straight to the ground.
B... |
[Question]
[
*This question brought to you by a game I like to play when stuck in long phone meetings.*
Given any two times from a 24 hour clock (from 00:00 to 23:59), how many valid mathematical equations can be generated with all of the times in between using only basic arithmetic operations?
**Input:** two four ... |
[Question]
[
Given a list of case-insensitive ASCII letter strings ("words"), output whether the entire list can be found on some four-by-four configuration ("board") of letter squares, in which no square can be used more than once in a word, and in which words are formed by moving from any square to any adjacent s... |
[Question]
[
In this challenge, I have a field of avocados which I'd like to juice as quickly and completely as possible. Can you write a program or function to help me work out how to juice all the avocados perfectly?
As input, you'll get the avocados as an `m`x`m` square grid, where `m` is an integer between 3 an... |
[Question]
[
King Julian needs to get through the jungle, but he's feeling lazy. He wants a computer to be able to calculate a route through the jungle for him.
Using STDIN get a map of the jungle for the computer to crack. It will follow the following format:
```
01001E
010110
000P00
1100J1
S00111
```
The way the ... |
[Question]
[
Write an algorithm to interpret a sequence of letters as a Roman numeral. (see roman numeral rules below)
Each distinct letter has a matching Arabic decimal value, no maximum. But you don't have the key beforehand, so `{A=10, I=1, X=5, ... Z=1000000}` is decided by your interpretation.
# Challenge
1.... |
[Question]
[
Your task is to play the roles of **both** characters in [this scene](https://www.youtube.com/watch?v=V3-a58Wt2tk&t=41) from Inception. In it, Cobb gives Ariadne a challenge:
>
> You have two minutes to design a maze that takes one minute to solve.
>
>
>
Some liberties will be taken on that descrip... |
[Question]
[
Key Links
* [Dwarf question](https://codegolf.stackexchange.com/questions/230965/play-thud-dwarf-edition)
* [Chat room](https://chat.stackexchange.com/rooms/127179/thud-challenge)
* [Game](https://ajfaraday.github.io/Thud/dist/index.html)
* [Controller Interface](https://github.com/AJFaraday/Thud/blob/... |
[Question]
[
# What is a Word Signature?
The signature of a word are all of it's letters put in order - the signatures of `this`, `hist` and `hits` are all `hist`.
# The Challenge
Write a program program should ask for an input, then print out the signature of that word. So an example program run might look like t... |
[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/22971/edit).
Closed 4 years ago.
[Improve this question](/posts/22971/edit)
... |
[Question]
[
**Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers.
---
**Want to improve this question?** Update the question so it focuses on one problem only by [editing this post](/posts/22473/edit).
Closed 4 years ago.
[Improve this question](/p... |
[Question]
[
## Challenge
The challenge is simple: **print a snake**.
You will get the length of the snake as input.
A snake of length 2 looks like this:
```
==(:)-
```
A snake of length 7 looks like this:
```
=======(:)-
```
In other words, *the length of a snake is how many equal signs are before the head*.
#... |
[Question]
[
# RLE Brainfuck
(related to [BF-RLE](https://esolangs.org/wiki/BF-RLE))
The hypothetical RLE ([Run-Length Encoding](https://en.wikipedia.org/wiki/Run-length_encoding)) dialect of Brainfuck accepts the symbols for the 8 commands and also accepts digits. The digits are used to represent the number of suc... |
[Question]
[
**Note: the first half of this challenge comes from Martin Ender's previous challenge, [Visualize Bit Weaving](https://codegolf.stackexchange.com/questions/83899/visualise-bit-weaving).**
The esoteric programming language [evil](http://esolangs.org/wiki/Evil) has an interesting operation on byte values... |
[Question]
[
## Challenge
Given a string such as `Hello World!`, break it down into its character values: `72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 33`.
Then calculate the difference between each consecutive pair of characters: `29, 7, 0, 3, -79, 55, 24, 3, -6, -8, -67`.
Finally, sum them and print the ... |
[Question]
[
For once, I was doing some real work, updating old code, and bumped into an expression that is equivalent to what would be written as ***πx + ex*** in good old-fashioned math. I thought it would be possible to write it shorter than it was written in the language I work with (APL), and therefore presen... |
[Question]
[
A very simple challenge today. Output a truthy value whether the ASCII character (or it's code) supplied is a brainfuck instruction (one of `+-,.<>[]`), and a falsy value if it's a comment (everything else).
## Input
```
+
#
<
>
.
P
,
```
## Output
```
true
false
true
true
true
false
true
```
[Ans... |
[Question]
[
Given a non-negative integer n, enumerate all palindromic numbers (in decimal) between 0 and n (inclusive range). A palindromic number remains the same when its digits are reversed.
The first palindromic numbers (in base 10) are given [here](http://oeis.org/A002113):
>
> 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ... |
[Question]
[
>
> [Cops thread](https://codegolf.stackexchange.com/questions/136150/restricted-mini-challenges-cops-thread)
>
>
>
Your task as robbers is to find cops solutions and write a program in the language provided that computes the nth term of the sequence using only the bytes in the provided set.
The g... |
[Question]
[
Simply put, your goal is to create a complete program that [modifies its own source code](https://en.wikipedia.org/wiki/Self-modifying_code) until every character of the source is different than what it started as.
Please include the beginning source as well as the ending source in your post, as well a... |
[Question]
[
## Challenge
Write a program that applies an injective function which takes an ordered pair of strings as input and one string as output. In other words, each input must map to a unique output.
## Specifics
* The input may be *any* two strings of arbitrary length, but will consist only of printable ASC... |
[Question]
[
**Task:**
Return an array with **all possible pairs** between the elements of an array.
**Example**
From `a=["a", "b", "c", "d"];` return `b=[["a","b"],["a","c"],["a","d"],["b","c"],["b","d"],["c","d"]]`.
Pairs can be in any order as long as all possible combinations are included and obviously `["b","... |
[Question]
[
You just recently got a new phone, but you don't quite like the way it vibrates, you've decided you want to create your own vibration patterns. So, you've written a program where you used the keywords `long`, `short` and `pause` to make your phone vibrate according to these keywords.
## Task
Create a s... |
[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/1171/edit).
Closed 7 years ago.
[Improve this question](/posts/1171/edit)
##... |
[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]
[
[There is a challenge for multiplying two numbers so I guess this counts too](https://codegolf.stackexchange.com/q/106182/91213)
Given as input a positive real number `n` compute its natural logarithm.
Your answer should be within \$10^{-6}\$ for \$1 \leq n \leq 10\$ and within \$10^{-3}\$ for \$0.1 \l... |
[Question]
[
The challenge is to remove vowels (a, e, i, o, u) from string from STDIN (yes, I know, simple). You can expect that your program will be not ran with any arguments in `argv`.
Example:
```
This program will remove VOWELS.
So we can now speak without them.
```
Is changed to:
```
Ths prgrm wll rmv VWLS.
S... |
[Question]
[
## Definition of long text
Long text usually **shows emphasis**, for instance, `loooooool` or `yaaaaaaaaaay`. Usually the vowel is replicated many times. In this challenge we require:
* At least 3 times, which means `yaaay` and `yaaaay` are allowed, but `yay` and `yaay` are not.
* Consistent, which mea... |
[Question]
[
Your boss wants you to write code like this:
```
public static boolean isPowerOfTen(long input) {
return
input == 1L
|| input == 10L
|| input == 100L
|| input == 1000L
|| input == 10000L
|| input == 100000L
|| input == 1000000L
|| input == 10000000L
|| input == 100000000L
|| inp... |
[Question]
[
This is the robbers' thread. The cops' thread [goes here](https://codegolf.stackexchange.com/questions/67756/printing-ascending-ascii-cops).
In the cops thread, the task was to create a program that outputs printable ASCII characters in ascending order. The robbers task is to unscramble the code the co... |
[Question]
[
This happy individual is known in folklore as the Easter Bunny.
[](https://i.stack.imgur.com/U75Ab.png)
# Colours
It is created using 4 colours:
* Light pink
* Dark pink
* White
* Black
(I'm happy for these colours to be approximated in your answer. I... |
[Question]
[
In Australian Football, goals are worth 6 points and behinds are worth 1 point. Scores may include the number of goals and behinds, as well as the total score. Given the number of goals and behinds for two different teams, determine which team won the game.
Take four integers `g1, b1, g2, b2` as input,... |
[Question]
[
### Challenge
Create a console program to display each byte of a file.
---
### Winning
Since this is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), fewest bytes wins.
---
### Rules
* Program **must be a console application**, meaning that it will be ran from some sort of ... |
[Question]
[
**Objective**: Given a positive integer `n`:
* If `n` is odd, output the list of `n` numbers closest to `0` in increasing order
* If `n` is even, output a Falsey value.
**Test cases**:
```
5 -> [-2,-1,0,1,2]
4 -> false (or any Falsey value)
1 -> [0]
```
---
## Reference implementation
```
function upda... |
[Question]
[
Bob has a startup that is developing a product that uses “advanced AI” and “black magic” to automatically code-golf computer programs. Unfortunately, Bob is running out of cash and desperately needs money from investors to keep his company running. Each investor that Bob has contacted wishes to schedul... |
[Question]
[
Given you have an infinite sequence of numbers defined as follows:
```
1: 1 = 1
2: 1 + 2 = 3
3: 1 + 3 = 4
4: 1 + 2 + 4 = 7
5: 1 + 5 = 6
6: 1 + 2 + 3 + 6 = 12
7: 1 + 7 = 8
...
```
The sequence is the sum of the divisors of `n`, including 1 and `n`.
Given a positive integer `x` as input, calculate the lo... |
[Question]
[
Inspired by [this](https://chat.stackexchange.com/transcript/message/38366096#38366096) and the following chat:
[](https://i.stack.imgur.com/STXcP.jpg)
Your task is to output the following:
```
_ _ _
/_/_/_/\
/_/_/_/\/\
/_/_/_/\/\/\
\_\_\_\/\/\/
... |
[Question]
[
The goal of a Rosetta Stone Challenge is to write solutions in as many languages as possible. Show off your programming multilingualism!
# The Challenge
Your challenge is to implement a program that will input a list of numbers and output the rule used to generate each successive number in the series, ... |
[Question]
[
This small challenge derives from my annoyance at discovering that numpy doesn't have a built in function for it.
# Input
An n by m matrix of integers.
# Output
The maximum value in the matrix and the 2d coordinates of one of its occurrences. The coordinates should be in the order (row\_idx, col\_idx) ... |
[Question]
[
Write a program which takes two arrays of positive integers as input. One of them (your choice which) will have one item missing compared to the other. Your program must figure out what is missing.
# Rules
You can choose which array has one missing: You can take ordinary then missing or vice versa.
Arr... |
[Question]
[
# Code-Bowling Challenge
Write a program or function that produces the same output, no matter how you re-arrange the source code. *(Output can't be an error)*
---
# [Pangram](https://codegolf.meta.stackexchange.com/q/11737/16513) Scoring
* Your score is the amount of unique characters in your source co... |
[Question]
[
In the spirit of [Hello world! with NO repetition](https://codegolf.stackexchange.com/questions/18925/hello-world-with-no-repetition)
Write a program that prints the string "the quick brown fox jumps over the lazy dog" with optional newline. The entire program must not repeat any characters.
Note that ... |
[Question]
[
Weirdo Incorporates have a weird way of grading their staffs by the number of days they were present in the office:
```
0 - 13 : F
14 - 170 : E
171 - 180 : D
181 - 294 : C
295 - 300 : B
301 - 365 : A
Note: The range is inclusive (i.e. 0-13 means 0 days and 13 days both will evaluate
as grade 'F')... |
[Question]
[
# Intro:
I remember, when I was a kid, I would get a calculator and keep on pressing the `+` button, and see how high I could count. Now, I like to program, and I'm developing for iOS.
Counting is a fundamental skill for both humans and computers alike to do. Without it, the rest of math can't be done.... |
[Question]
[
# TASK
print integers n, where `12 <= n <= 123456789`, and all pairs of consecutive digits in n have the same positive difference between them (e.g. 2468 but not 2469).
# NO INPUT.
# Output:
```
12
13
14
15
16
17
18
19
23
24
25
26
27
28
29
34
35
36
37
38
39
45
46
47
48
49
56
57
58
59
67
68
69
78
79
89
... |
[Question]
[
I am learning [Ruby](http://en.wikipedia.org/wiki/Ruby_%28programming_language%29) and wrote my first nontrivial code to solve this problem.
The challenge is to generate the first *n* elements of the [Stöhr sequence](http://mathworld.wolfram.com/StoehrSequence.html), *S*, which is defined as follows:
>... |
[Question]
[
### [SE will be down/read only ~~today~~ 2017-05-04 at 00:00 UTC until 00:20 UTC.](https://meta.stackexchange.com/q/295285/338745)
Your challenge is to output a truthy value if SE is down/read only and a falsy value if SE is not. You may not have any input, and you must use date builtins to determine i... |
[Question]
[
In the shortest amount of code in any programming language, filter out the duplicate items in an array of which the order is irrelevant.
Here are some test cases:
```
[1, 2, 2, 3, 1, 2, 4] => [1, 2, 3, 4]
['a', 'a', 'b', 'a', 'c', 'a', 'd'] => ['a', 'b', 'c', 'd']
```
>
> I also should note that there... |
[Question]
[
**Challenge:** Produce the following output using as few chars as possible:
```
_ _ _ _ _ _ _
| | | | ___| | | ___ __ _____ _ __| | __| | |
| |_| |/ _ \ | |/ _ \ \ \ /\ / / _ \| '__| |/ _` | |
| _ | __/ | | (_) | \ V V / (_) | | | | (_| |_|
|_| ... |
[Question]
[
## Background
We define the two types of chain to be a string that contains only dashes, "-", or only underscores, "\_". We link two chains using one equals sign, "=".
Criteria:
1. The type of chain must change following an equals sign.
2. You must link the chains, you can do so multiple times, and it ... |
[Question]
[
It's obviously ellipsisessieses.
Inspired by [a chat message](https://chat.stackexchange.com/transcript/message/39560898#39560898).
# Your challenge
Given a list or space or comma-separated string of words, ellipsisessiesesify them.
To ellipsisessieses-ify a word:
1. Start with the word.
2. Add the fir... |
[Question]
[
The task is simple: your program reads an integer as an input, and prints whether it is a prime or not. You can print "yes/no", "true/false" or anything what unambiguously identifies the result.
The challenge is, the code has to work with its rows and columns transposed.
To exclude the obvious solution... |
[Question]
[
**This question already has answers here**:
[Is this number a prime?](/questions/57617/is-this-number-a-prime)
(367 answers)
Closed 6 years ago.
A [Sophie Germain Prime](https://en.m.wikipedia.org/wiki/Sophie_Germain_prime) is a [prime number](https://en.m.wikipedia.org/wiki/Prime_number) **P** ... |
[Question]
[
**This question already has answers here**:
["Hello, World!"](/questions/55422/hello-world)
(974 answers)
Closed 1 year ago.
It's well known that **Brainf\*ck** is very bad at Kolmogorov-complexity problems, for example, it requires around 100 characters just to print "Hello world".
However, the... |
[Question]
[
Interestingly, although there are challenges that work with images, there is no challenge to simply output an image. This is that challenge
Goal: output an image in the shortest possible code.
Output: Any image output is accepted. Files would be preferable, but most any non-character on the screen will... |
[Question]
[
**This question already has answers here**:
[Say What You See](/questions/70837/say-what-you-see)
(34 answers)
Closed 3 years ago.
You are too make a program that take an integer as the input and outputs the first what ever that number was of the [look and say sequence](http://en.wikipedia.org/w... |
[Question]
[
## Objective
Write a program or function (or equivalent) that sorts out and returns the odd letter in the matrix of random size.
## Details
You will be passed a matrix (as a string) as input of random dimensions such as this.
```
bbbbbbbbbb
bbbbbdbbbb
bbbbbbbbbb
bbbbbbbbbb
bbbbbbbbbb
```
Your job is to... |
[Question]
[
## Challenge
Suppose you have a list of numbers, and a target value. Find the set of all combinations of your numbers which add up to the target value, returning them as list indices.
## Input and Output
The input will take a list of numbers (not necessarily unique) and a target summation number. The o... |
[Question]
[
Given a positive integer *n* output the *n*-th number of the euro-iginal sequence.
## Calculating the Sequence
This sequence is equal to OEIS [A242491](https://oeis.org/A242491).
A number is part of said sequence if the number can be made up by using as many different euro coins or notes, but **only on... |
[Question]
[
Given three numbers ***m***,***n*** and ***p***, your task is to print a list/array of length ***p*** starting with ***m*** and ***n*** and each element after ***p*** represents the difference of the 2 numbers before it, ***m-n*** (Counter-**[Fibonacci Sequence](https://en.wikipedia.org/wiki/Fibonacci_... |
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.