text stringlengths 180 608k |
|---|
[Question]
[
The set of all polynomials with **integer** coefficients is countable.
This means that there is a sequence that contains each polynomial with integer coefficients exactly once.
Your goal is it to write a function or program that outputs such a sequence.
Example (you may use another sequence):
```
// li... |
[Question]
[
I just discovered this site and this is my first question, I hope I'm doing it correctly.
The challenge is the following, you must write a code that prints all the prime numbers of \$n\$ digits. Since this problem is computationally complicated, I think that one way to simplify it is to give a number \... |
[Question]
[
## Input:
A non-empty list / vector where each element holds a value/character, indicating if you'll count **up** or **down**. I'll use `1` and `-1`, but you may choose whatever you like. You can only use two values, you can't use `1,2,3...` and `-1,-2,-3...`, for up and down respectively.
## Challenge... |
[Question]
[
Write a function which takes a list or array, and returns a list of the distinct elements, sorted in descending order by frequency.
Example:
Given:
```
["John","Doe","Dick","Harry","Harry","Doe","Doe","Harry","Doe","John"]
```
Expected return value:
```
["Doe","Harry","John","Dick"]
```
[Answer]
#... |
[Question]
[
In a [certain chatroom](https://chat.stackexchange.com/rooms/106764/Vyxal), we like making acronym jokes about the build tool we use called [sbt](https://www.scala-sbt.org/). While it usually stands for "**S**cala **B**uild **T**ool", we aim to come up with all sorts of meanings, such as:
* Stupid Bric... |
[Question]
[
Given a list of floating point numbers, [*standardize it*](https://en.wikipedia.org/wiki/Standard_score).
### Details
* A list \$x\_1,x\_2,\ldots,x\_n\$ is *standardized* if the *mean* of all values is 0, and the *standard deviation* is 1. One way to compute this is by first computing the mean \$\mu\$ ... |
[Question]
[
# Task
Given two positive integers (divid**e**nd and divis**o**r), calculate the **q**uotient and the **r**emainder.
Normally it would be calculated as `e = o*q+r` where `q*o<=e` and `0<=r<o`.
For this challenge it still `e = o*q+r` but `q*o>=e` and `-o<r<=0`.
For example `e=20` and `o=3`, normal... |
[Question]
[
I'm designing a new space station for generic super-villain purposes (something something megalaser), but I'm having trouble designing the solar panels.
My genius team of scientists can calculate exactly how many square meters of paneling we need to power the station, but the problem is our solar panel... |
[Question]
[
The [fast growing hierarchy](https://en.wikipedia.org/wiki/Fast-growing_hierarchy) is a way of categorizing how fast functions are growing,
defined the following way (for finite indices):
* \$ f\_0(n)=n+1 \$
* \$ f\_k(n)=f\_{k-1}^n(n)\$ with \$f^n\$ meaning repeated application of the function f
## Exa... |
[Question]
[
Given n, k, and p, find the probability that a weighted coin with probability p of heads will flip heads at least k times in a row in n flips, correct to 3 decimal digits after decimal point (changed from 8 because I don't know how to estimate the accuracy of double computation for this (was using arbi... |
[Question]
[
Given an input string and a wrapping string, find the location of the first input string char in the wrapping string and replace it with the wrapping string char 1 step to the right of that, find the second char in the wrapping string and replace it with the char 2 steps to the right, find the third an... |
[Question]
[
Challenge Taken from [here](https://code.google.com/codejam/contest/4214486/dashboard#s=p3) and also [here](https://bo.spoj.com/problems/AI_BRACK/)
An **n** parentheses sequence consists of **n** `(`s and **n** `)`s.
A valid parentheses sequence is defined as the following:
>
> You can find a way to r... |
[Question]
[
## Introduction:
Apparently I keep coming up with word search related challenges lately. :)
When I do the word search in the Dutch news paper, some words are very easy to find because they contain letters that aren't too common in Dutch words, like `x` or `q`. So although I usually look for the first... |
[Question]
[
## The task
Given the set
$$S = \left[{1,2,3,4,5,6,7,8}\right]$$
and an integer
$$0 \leq N < 2^{|S|}$$
find the Nth subset.
## Input/Output
*N* is given as an unsigned integer on stdin. You must print the Nth subset in a format suitable for your language (this may include `[1,2,3]`,`{1,2,3}`,`[1, 2, 3... |
[Question]
[
A [piggy bank](https://en.wikipedia.org/wiki/Piggy_bank) is a container used to collect coins in. For this challenge use the four US coins: [quarter, dime, nickel, and penny](https://en.wikipedia.org/wiki/Coins_of_the_United_States_dollar).
# Challenge
Your challenge is to create an electronic piggy ba... |
[Question]
[
# Challenge
Given input in the form `<n1>, <n2>` where number can be -1, 0, or 1, return the corresponding [cardinal direction](https://en.wikipedia.org/wiki/Cardinal_direction). Positive numbers move East in the x-axis and South in the y-axis, Negative numbers move West in the x-axis and North in the ... |
[Question]
[
Let's have a ragged list containing no *values*, only more lists. For example:
```
[[[],[[]],[],[]],[],[[],[],[]],[]]
```
And the list will be finite, meaning that eventually every path terminates in an empty list `[]`.
It's simple enough to determine if two of these are structurally equal. Check each ... |
[Question]
[
**This question already has answers here**:
[Fold a List in Half](/questions/136887/fold-a-list-in-half)
(58 answers)
Closed 5 years ago.
The rules are as follows:
* Take in a string of integers separated by spaces. Add the first and last numbers, the second and second-last numbers, and so on.
*... |
[Question]
[
The [characteristic polynomial](https://en.wikipedia.org/wiki/Characteristic_polynomial) of a square matrix \$A\$ is defined as the polynomial \$p\_A(x) = \det(Ix-A)\$ where \$I\$ is the [identity matrix](https://en.wikipedia.org/wiki/Identity_matrix) and \$\det\$ the [determinant](https://en.wikipedia... |
[Question]
[
This challenge is similar to [this other](https://codegolf.stackexchange.com/questions/32381/convert-english-to-a-number), however I made a restriction (see bold text below) that I think would made it much diffent and (I hope) fun either.
# The Challenge
Write a program or a function in any programmin... |
[Question]
[
The ubiquitous 7-segment numerical display can unambiguously display all 16 hexadecimal digits as show in [this wikipedia .gif](http://en.wikipedia.org/wiki/Seven-segment_display#mediaviewer/File:7-segments_Indicator.gif)
Entries for this challenge will create a circuit diagram using NAND logic gates w... |
[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/5810/edit).
Closed 2 years ago.
[Improve this question](/posts/5810/edit)
Th... |
[Question]
[
Write 2 programs in the same language which count the number of shared subsequences of consecutive elements from 2 given sequences.
For example, given `"test"` and `"enter"`, there are 5 shared subsequences of consecutive elements:
```
t
t
e
e
te
```
One possible algorithm consists in counting, for eac... |
[Question]
[
**This question already has answers here**:
[Product over exclusive and inclusive ranges](/questions/66285/product-over-exclusive-and-inclusive-ranges)
(25 answers)
[Interpret Interval Notation](/questions/217297/interpret-interval-notation)
(18 answers)
Closed 2 years ago.
Inspired by [this]... |
[Question]
[
In any programming language, create a program that takes input and animates the text being typed on a keyboard.
The delay between each character should be varying to simulate true typing on a keyboard. The delay shall be `0.1, 0.1, 0.5, 0.1, 0.1, 0.5 ...` seconds, until the last character is printed. T... |
[Question]
[
## Introduction
You use Twitter (let's pretend, if not), where you are limited to 140 characters per individual tweet you care to share with the world. If you wanted to tweet to your followers Abraham Lincoln's [Gettysburg Address](http://en.wikisource.org/wiki/Gettysburg_Address_%28Lincoln_Memorial%29... |
[Question]
[
I recently saw some questions on SO that asked if you could make a Hello World program without using any semi colons using C#. The challenge is to do this again, but in the shortest amount of code possible!
[Answer]
# C# 85 chars
```
class H{static void Main(){if(System.Console.Out.WriteAsync("Hel... |
[Question]
[
**This question already has answers here**:
[Find the number in the Champernowne constant](/questions/66878/find-the-number-in-the-champernowne-constant)
(29 answers)
Closed last month.
Someone I know has no coding experience, but has proposed an algorithm\* to determine the character limit of t... |
[Question]
[
The [resultant](https://en.wikipedia.org/wiki/Resultant) of two polynomials is a polynomial in their coefficients that is zero if and only if \$p\$ and \$q\$ have a common root. It is a useful tool for eliminating variables from systems of polynomial equations. For example, it is used in [my answer](ht... |
[Question]
[
Given a volume level `V` in the range `1-10`. Your program should draw the following ASCII art.
When `V=1`:
```
\
|
/
```
When `V=2`:
```
\
\ |
| |
/ |
/
```
When `V=3`:
```
\
\ |
\ | |
| | |
/ | |
/ |
/
```
And etc. Trailing spaces are allowed.
This is a code-golf challenge so... |
[Question]
[
Convert short date format into English long date in as few bytes as possible.
# Input
Input will be in the form of a string with format, `yyyy-mm-dd`, with zero padding optional for all values. You can assume that this is syntactically correct, but not necessarily a valid date. Negative year values do ... |
[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/10783/edit).
Closed 1 year ago.
[Improve this question](/posts/10783/edit)
O... |
[Question]
[
Write a program using the fewest bytes of source code which given a list of strings finds all elements which are still in the list when any character is deleted.
For example, given a list of all English words `boats` would be output because `oats`, `bats`, `bots`, `boas`, `boat` are all English words a... |
[Question]
[
# Input
A nonnegative integer `n`, and a nonempty string `s` containing only alphanumeric characters and underscores `_`.
The first character of `s` is not `_`.
The underscores of `s` are interpreted as blank spaces that can be filled with other characters.
We define an infinite sequence of "infinite s... |
[Question]
[
A Bayer matrix is a threshold map used for [ordered dithering](https://en.wikipedia.org/wiki/Ordered_dithering) that gives the illusion of having more shades of color than actually present by using a crosshatch-like pattern.
Bayer matrices are square with a side length that is a power of 2. Here are so... |
[Question]
[
Inspired by this building (United States Air Force Academy Cadet Chapel, Colorado)
[](https://i.stack.imgur.com/sDxIp.png)
Your task is simple, given a positive integer `n`, output the spiked building to size `n`
# Testcases
```
1
->
... |
[Question]
[
For a given number `n`, output an strictly decreasing array whose sum is `n` and its lexicographical order is the smallest for any possible outputs
Smallest lexicographical order means that for or sum `n=9` the following strictly decreasing arrays are possible: `[[9],[8,1],[7,2],[6,3],[5,4],[6,2,1],[5,... |
[Question]
[
For the context of this challenge, a *matched group* is a digit \$n\$, followed by \$n\$ more matched groups. In the case of \$n = 0\$, that's the whole matched group. Digits only go up to 9.
For example, 3010200 is a valid matched group, as:
```
3 # 3, capturing three elements...
0 # a 0 (... |
[Question]
[
**Challenge**
Giving a valid arithmetic sum with some missing numbers, output the full expression.
Example:
```
1#3 123
+ 45# => + 456
-------- --------
579 579
```
**Input**
* Expression format can be an array `["1#3", "45#", "579"]`, a ... |
[Question]
[
Your challenge is to write a program, function, etc. that calculates if the passed string is "in order". That means that the characters of the string have character codes that are in order from smallest to largest. The smallest char code must be the first. By that I mean lowest unicode codepoints to hi... |
[Question]
[
Using you language of choice, write the shortest function/script/program you can that will identify the word with the highest number of *unique* letters in a text.
* Unique letters should include any distinct character using [UTF-8 encoding](https://en.wikipedia.org/wiki/UTF-8).
+ Upper and lower cas... |
[Question]
[
In this task you will be given A (less than 10000 digits long) and B (less than 2^64), and you will need to compute the last digit of (A · A · A · ... · A (B times)).
The inputs A and B are given in a single line separated by a blank; the inputs are terminated by EOF.
**Input**
```
3454323232132324324... |
[Question]
[
Though challenges involving magic squares abound on this site, none I can find so far ask the golfer to print / output all normal magic squares of a certain size. To be clear, a normal magic square of order \$n\$ is:
1. An \$n\times n\$ array of numbers.
2. Each positive integer up to and including \$n... |
[Question]
[
The task is simple. You are given a string with **alphabetical words** (say `"Hello world, this are tests"`). You have to return the [**mode**](https://en.wikipedia.org/wiki/Mode_(statistics)) of the lengths of words in the string. In this case, output is `5`, as it's the *most often length* of words i... |
[Question]
[
A [Quine](https://en.wikipedia.org/wiki/Quine_(computing) "Wikipedia") is a program which outputs its source when run.
In this challenge, You should make a Fibonacci-quine, a variant of the quine.
---
## What is a Fibonacci-quine?
A Fibonacci-quine is a program, which outputs a modification of the sour... |
[Question]
[
*Playing the game of memory against a machine is highly unfair, because they play almost as good as small children. So let's make the machine play alone, but in a fair way:*
* **Input**: 1...26 pairs of lowercase letters in random order like `zz` or `gttg` or `abcdefghiabcdefghi`. You can trust each le... |
[Question]
[
*Disclaimer: This isn't my challenge but [ThisGuy](https://codegolf.meta.stackexchange.com/a/11802/67719) said I was OK to post.*
---
Occasionally I want to make a word into it's opposite, like `happiness` goes to `unhappiness`. Unfortunately when this happens, my brain will sometimes go blank. Then on... |
[Question]
[
In some languages, strings are started and ended with a quote mark (`'`). And quote itself is escaped by writing it twice sequentially. For example, empty string is written as `''`, and `I'm` is written as `'I''m'`.
This question is about find out all non-overlapping strings from left to right in such ... |
[Question]
[
I have a colleague at work that works from home every Tuesday and Thursday. At around 8:00 AM he sends us a message with the following text:
>
> Hello today I'm working from home
>
>
>
In order to relieve him from the burden of doing this every day he stays at home, we would like to automate this t... |
[Question]
[
A [Pillai prime](https://en.wikipedia.org/wiki/Pillai_prime) is a prime number \$p\$ for which there exists some positive \$m\$ such that \$(m! + 1) \equiv 0 \:(\text{mod } p)\$ and \$p \not\equiv 1\:(\text{mod }m)\$.
In other words, an integer \$p\$ is a Pillai prime if it is a [prime number](https:/... |
[Question]
[
Your program gets a text as an input, at least 8 characters long, and always consisting of even number of characters. (no need to evaluate correctness of input).
Your goal is to display that text as a rectangle. For example, given `HelloWorld` as an input, display
```
Hell
d o
lroW
```
Rules:
* Text ... |
[Question]
[
[Hamming number](https://en.m.wikipedia.org/wiki/Regular_number) (also known as regular number) is a number that evenly divides powers of 60.
[We already have a task to do something with it.](https://codegolf.stackexchange.com/q/7/100411)
This time we are going to do the opposite.
I define non-Hamming ... |
[Question]
[
The dihedral group \$D\_4\$ is the [symmetry group](https://en.wikipedia.org/wiki/Symmetry_group) of the square, that is the moves that transform a square to itself via rotations and reflections. It consists of 8 elements: rotations by 0, 90, 180, and 270 degrees, and reflections across the horizontal,... |
[Question]
[
# Challenge:
Your job is to create a simple interpreter for a simple golfing language.
---
# Input:
Input will be in the form of string separated by spaces.
**You can replace space separation with what you want**
---
# Output:
Output the result (a number or a string) obtained after performing all oper... |
[Question]
[
This is the inverse of "[Encode the date in Christmas Eve format](https://codegolf.stackexchange.com/questions/178003/encode-the-date-in-christmas-eve-format)."
Write a program that takes as input the string `Christmas`, possibly followed by `Eve` between 1 and 365 times, and outputs the date encoded ... |
[Question]
[
(or: Output the plural demonym.)
When in Rome, do as the Romans do. This is a well-known English phrase meaning that it’s best to follow what others are doing around you — to go with the flow. Today, you're going to rewrite the phrase to fit most (Western) place names.
To get the name of a group that l... |
[Question]
[
*Inspired by [this SO post](https://stackoverflow.com/questions/71017483/closest-subsequent-index-for-a-specified-value).*
Given a vector (first parameter), e.g.:
```
char = ["A", "B", "C", "A", "A"]
```
For each element of the vector, find the distance to the closest **subsequent** specified value (se... |
[Question]
[
This is similar in concept to [this challenge,](https://codegolf.stackexchange.com/questions/12851/game-of-set-puzzle) but that is pretty restrictive on input and output and I think opening up these restrictions would lead to a completely different set of solutions that would be interesting in their ow... |
[Question]
[
Inspired by [I reverse the source code, ...](https://codegolf.stackexchange.com/search?q=I+reverse+the+source+code)
Your task, if you wish to accept it, is to reverse text and mirror select characters. Yes, yes, I know. Very surprising.
## Input
A string, `stdin`, an array of characters, or any other s... |
[Question]
[
## Time sheets
In a work place you often have to complete time sheets. This task is write code to help this.
# Input
Two times in a slightly non- standard 12 hour clock signifying the start and end of the day separated by a space. A third number represents the number of minutes taken for lunch. For exa... |
[Question]
[
**This question already has answers here**:
[Is it a weak prime?](/questions/131503/is-it-a-weak-prime)
(23 answers)
Closed 6 years ago.
>
> [In number theory, a strong prime is a prime number that is greater than the arithmetic mean of the nearest prime above and below (in other words, it's cl... |
[Question]
[
Create a program that determines, given an input of the path, whether Mario can reach the end, denoted by `E`, from the start, denoted by `S`.
A path will look something like this:
```
S = E
=====
```
In a path, the various symbols and what they represent are:
* `=`: wall/floor/ceiling. Mario cannot wa... |
[Question]
[
**Cue Storyline:** It is the early 21st century, and most things have become a thing of the past. You and your fellow code-golf-eteers, however, are on a quest to reenact the 1990s. As a part of this challenge, you must recreate a minimalistic chatroom.
**The Goal:** To create a chatroom with as few by... |
[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]
[
## Introduction *(may be ignored)*
Putting all positive integers in its regular order (1, 2, 3, ...) is a bit boring, isn't it? So here is a series of challenges around permutations (reshuffelings) of all positive integers. This is the sixth challenge in this series (links to the [first](https://codego... |
[Question]
[
### Challenge
Given a matrix **M** with **r** rows and **c** columns, and two Boolean lists **V** of length **r** and **H** of length **c**, calculate the partitioned cumulative vertical and horizontal sums.
### Rules
* **r** and **c** are greater than or equal to one
* **H** and **V** begin with a tru... |
[Question]
[
(via [chat](http://chat.stackexchange.com/transcript/message/30081079#30081079))
The OEIS entry [A123321](http://oeis.org/A123321) lists the sequence of numbers that are the product of seven distinct primes. For brevity, we'll call this a *7DP* number. The first few numbers and their corresponding divi... |
[Question]
[
# Merge Sort
In this challenge, you will implement the merge subroutine of merge sort. Specifically, you must create a function or program or verb or similar which takes two lists, each sorted in increasing order, and combines them into one list sorted in increasing order.
Requirements:
# - Your algor... |
[Question]
[
Braille Patterns in Unicode contains 8 dots(`⣿`) and occupy area U+2800-U+28FF. Given a Braille Pattern character, where the bottom two dots are not used(aka. U+2800-U+283F), shift it down by one dot.
Test cases:
```
⠀ => ⠀ (U+2800 -> U+2800)
⠅ => ⡂
⠕ => ⡢
⠿ => ⣶
```
Shortest code wins.
[Answer]
#... |
[Question]
[
[Martin Ender](https://codegolf.stackexchange.com/users/8478/martin-ender)'s 2D programming language [Alice](https://github.com/m-ender/alice) has two different modes depending on what orientation the IP has: orthogonal (Cardinal mode) or diagonal (Ordinal mode). Commands in Alice change their meaning ... |
[Question]
[
Consider the following sequence:
```
1, 0, 1, 2, 4, 1, 6, 8, 0, 1, 2, 4, 6, 8, 1, 0, 2, 4, 6, 8, 1, 0, 2, 4, 6, 8, 0, 1, ...
```
The even digits start from **0** and are grouped into runs of increasing length. They are arranged cyclically, meaning that they are sorted in ascending order until **8** is ... |
[Question]
[
Let's say you have a positive integer *N*. First, build a **regular** polygon, that has *N* vertices, with the distance between neighbouring vertices being 1. Then connect lines from every vertex, to every other vertex. Lastly, calculate the length of all lines summed up together.
# Example
Given the i... |
[Question]
[
*Inspired by [this](https://chat.stackexchange.com/transcript/message/39979766#39979766) CMC*
Given a positive integer greater than 0, perform the following operation on it:
* If all ten single digits (`1234567890`) are in the number at least once, output the count and exit the program
* Otherwise, dou... |
[Question]
[
[Keep Talking and Nobody Explodes](http://www.keeptalkinggame.com/) is a local multiplayer game where one player has control over a virtual "bomb", and has to be guided by another player, the "expert", who has access to a bomb defusal manual. One of the modules to be disarmed in the game is the keypad ... |
[Question]
[
Inspired by [this link I found on Reddit](http://blog.amjith.com/fuzzyfinder-in-10-lines-of-python).
A FuzzyFinder is a feature of many text editors. As you start to type a file path `S`, the FuzzyFinder kicks in and shows you all files in the current directory containing the string you entered, sorted... |
[Question]
[
Produce the shortest program which takes two signed integers as input (through stdin or as arguments) and displays 3 different outputs depending upon whether the first number is (1) greater than, (2) smaller than, or (3) equal to the second number.
**The Catch**
You cannot use any of the following in y... |
[Question]
[
Discussion in courtrooms often occurs at a high speed and needs to be accurately transcribed in case the text of the decision is needed in future cases. For this purpose, the stenographers who transcribe court discussions use specially designed keyboards with a small set of buttons, which are pressed i... |
[Question]
[
**This question already has answers here**:
[Mathematical Combination](/questions/1744/mathematical-combination)
(36 answers)
Closed 2 years ago.
Given two inputs, a number n and a dimension d, generate the nth d-dimensional pyramid number.
That was confusing, let me try again.
For d = 1, the nu... |
[Question]
[
## Challenge
Given a number `x` and a precision `e`, find the lowest positive integer `q` such that `x` can be approximated as a fraction `p / q` within precision `e`.
In other words, find the lowest positive integer `q` such that there exists an integer `p` such that `abs(x - p/q) < e`.
## Input
* The... |
[Question]
[
This is a [restricted-source](/questions/tagged/restricted-source "show questions tagged 'restricted-source'"), [kolmogorov-complexity](/questions/tagged/kolmogorov-complexity "show questions tagged 'kolmogorov-complexity'"), [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") ... |
[Question]
[
Take two positive integers `N` and `M` and create the concatenated cumulative sums of `[N]`, with `M` iterations. Output the result of the last iteration.
**Definition of the concatenated cumulative sum:**
1. Start with a number `N` and define a sequence `X = [N]`
2. Append to `X` the cumulative sums o... |
[Question]
[
For this challenge, you are to output the result of the sum of some numbers. What are these numbers? Well, you are given input, (`a`, `b`), which are integers (positive, negative, or zero) , `a != b`, and `a < b` , and each integer within `a` and `b` (including them) will have exponents according to th... |
[Question]
[
# Definition
From the description on OEIS [A006345](https://oeis.org/A006345):
>
> To find `a(n)`, consider either a `1` or a `2`. For each, find the longest repeated suffix, that is, for each of `a(n)=1,2`, find the longest sequence `s` with the property that the sequence `a(1),...,a(n)` ends with `s... |
[Question]
[
I don't know who coined these words, and I'm not Irish, but I give you an Irish blessing:
```
May the road rise up to meet you
May the wind be always at your back
May the sun shine warm upon your face
The rains fall soft upon your fields
And until we meet again
May God hold you in the hollow of His han... |
[Question]
[
In this challenge, you'll print out the SBCS of [Jelly](https://github.com/DennisMitchell/jellylanguage), a popular golfing language. Its code page looks like this:
| | \_0 | \_1 | \_2 | \_3 | \_4 | \_5 | \_6 | \_7 | \_8 | \_9 | \_A | \_B | \_C | \_D | \_E | \_F |
| --- | --- | --- | --- | --- | --- |... |
[Question]
[
## Background
You awake on the ground. Above you is a giant stepped pyramid-like structure. Based on your ancient history lessons, you recognize it as a [ziggurat](https://en.wikipedia.org/wiki/File:Chogha_Zanbil,_Ziggurat_(model).jpg). You have been transported by Dr. Sargostein back into ancient Meso... |
[Question]
[
Your input will consist of an 18×18 image in any reasonable format, containing a horizontally and vertically centered 14px Roboto Mono character. This can be any of 94 printable ASCII characters (not including the space). But: **you only need to be able to recognize some 80 character subset** of your c... |
[Question]
[
## Challenge
The challenge is simple, using <http://isup.me>, determine whether an inputted website is up or down.
If the site is up, you should return a truthy value and if the site is down, you should return a falsey value.
## Rules
The input will be a web address such as `stackexchange.com` or `goog... |
[Question]
[
# Introduction
In the land of [Insert cool name here], people don't buy things with money, because everyone has a severe allergy to paper. They pay eachother with words!
But how is that? Well, they give each letter number values:
```
a=1,b=2,c=3,etc.
```
(With some other special rules that will be des... |
[Question]
[
# Countdown
Your goal for this code-golf challenge is to count down and meanwhile *recycle* numbers. Let me explain.
First your application reads a number, either as program argument or using stdin.
Next you'll simply need to count down like this:
`10 9 8 7 6` (in *descending* order)
But wait, there is... |
[Question]
[
Consider a sequence of natural numbers for which N appears as a substring in N^2. [A018834](https://oeis.org/A018834)
Output the `n`th element of this sequence.
### Rules
Program takes only `n` as input and outputs just one number - `N`.
The sequence can be 0-indexed or 1-indexed.
```
Sequence: 1 5 6 1... |
[Question]
[
Find the area of a region of unit cells given its perimeter loop as a sequence of 90-degree turns.
For example, take the three-cell region
```
XX
X
```
whose perimeter loop we draw
```
L<S<L
v ^
S R>L
v ^
L>L
```
Each turn is marked as left (L), straight (S), or right (R). Starting from the R, the t... |
[Question]
[
Given a positive integer *n*, compute the *nth* [Wilson number](https://en.wikipedia.org/wiki/Wilson_prime#Wilson_numbers) *W(n)* where

and *e* = 1 if *n* has a primitive root modulo *n*, otherwise *e* = -1. In other words, *n* has a primiti... |
[Question]
[
Consider a binary string `S` of length `n`. Indexing from `1`, we can compute the [Hamming distances](https://en.wikipedia.org/wiki/Hamming_distance) between `S[1..i+1]` and `S[n-i..n]` for all `i` in order from `0` to `n-1`. The Hamming distance between two strings of equal length is the number of pos... |
[Question]
[
The goal is to animate a star exploding in ASCII art, starting from a single star character `*` to a supernovae and finally to the space void.
Rules :
* You have to display only 80 characters per line on 24 lines (this is
the default terminal size on Linux)
* Only these [95 printable characters from AS... |
[Question]
[
# Challenge
Generate two \$16 \times 16\$ grids, each initially filled with "@" symbols and spaces. Each cell in the grids should be independently filled with an "@" or a space, with each character having an equal probability (\$50\%\$) of being chosen for each cell. This ensures that both grids start ... |
[Question]
[
So I have the situation where I have one boolean value `a` and, if that one is `true` and `b<c` I want it to end up as `true`, if `a` is false and `b>c` I want it to resolve as `true` as well. If `b=c` I want it to be always false, no matter the value `b` and `c` are both numbers. My best approach so f... |
[Question]
[
Here's a programming puzzle for you:
Given a list of pairs of strings and corresponding numbers, for example, `[[A,37],[B,27],[C,21],[D,11],[E,10],[F,9],[G,3],[H,2]]`, output another list which will have just the strings in the following manner:
1. The total count of any string should be exactly equal ... |
[Question]
[
quintopia has posted [here](https://codegolf.stackexchange.com/questions/69424/compute-the-multinomial-coefficient) a challenge to compute multinomial coefficients (some of the text here is copied from there). There is a fun algorithm to compute multinomial coefficients mod 2.
Given a list of numbers,... |
[Question]
[
## Briefing
Given a Fully Qualified Java Class/ Package name, you must shorten it as such:
Each part of the dot separated package will be shortened to its first letter, apart from the last section and the class (if it exists).
package names will be all lower case, and the class (if it exists) will star... |
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.