text stringlengths 180 608k |
|---|
[Question]
[
Write a program that connects to this site, downloads the very answer in which it is posted, extracts its own source code and prints it out. The output must be identical to the source code. Shortest code (in bytes) wins.
Rules:
* No URL shorteners allowed.
* The answer must have a regular format - a he... |
[Question]
[
Write a program that will generate a "true" output [iff](http://en.wikipedia.org/wiki/If_and_only_if) the input matches the source code of the program, and which generates a "false" output iff the input does not match the source code of the program.
This problem can be described as being related to qui... |
[Question]
[
# Introduction
In order to prevent keyloggers from stealing a user's password, a certain bank account system has implemented the following security measure: only certain digits are prompted to be entered each time.
For example, say your target's password is `89097`, the system may prompt them to enter ... |
[Question]
[
Inspired by [George Gibson's Print a Tabula Recta](https://codegolf.stackexchange.com/q/86986/48934).
You are to print/output this exact text:
```
ABCDEFGHIJKLMNOPQRSTUVWXYZ
BBCDEFGHIJKLMNOPQRSTUVWXYZ
CCCDEFGHIJKLMNOPQRSTUVWXYZ
DDDDEFGHIJKLMNOPQRSTUVWXYZ
EEEEEFGHIJKLMNOPQRSTUVWXYZ
FFFFFFGHIJKLMNOPQRSTU... |
[Question]
[
In as few bytes as possible, write a program or function that outputs the following:
```
Abcdefghijklmnopqrstuvwxyz
aBcdefghijklmnopqrstuvwxyz
abCdefghijklmnopqrstuvwxyz
abcDefghijklmnopqrstuvwxyz
abcdEfghijklmnopqrstuvwxyz
abcdeFghijklmnopqrstuvwxyz
abcdefGhijklmnopqrstuvwxyz
abcdefgHijklmnopqrstuvwxy... |
[Question]
[
I love math. But I can't find a single calculator that can multiply correctly. They seem to get everything right except 6\*9 (It's the question to life, the universe, and everything! How could they get that wrong?!). So I want you all to write a function for me that can multiply 2 numbers correctly (an... |
[Question]
[
Your task is to write program which will draw 800x600 black-and-white image with something resembling a forest.
Like this (it is dithered photo):

# Rules
* You are disallowed to use any existing images - you should generate image purely algorithmically
* Use onl... |
[Question]
[
For this golf, you will need to use more than one language.
# The task
A [Rube Goldberg machine](https://en.wikipedia.org/wiki/Rube_Goldberg_machine) is a contraption that takes an enormous number of complicated steps in order to execute a very simple task. The goal of this golf is to output `Rube Gold... |
[Question]
[
# [Oreoorererereoo](https://i.redd.it/kqibcu69xm721.jpg)
Given an input string that is similar to the word "oreo", give an ASCII representation of the cookie that is as wide as the input string (to ensure cookie stability).
## Rules
* The input is lowercase, a non-empty string with no whitespace conta... |
[Question]
[
You are Desmond Hume. For the last 3 years, you and your partner, Kelvin, have been slave to a computer that requires a very specific sequence to be entered into it every 108 minutes to save the world.
```
4 8 15 16 23 42
```
Your partner died 40 days ago (due to an unfortunate accident involving Kelvi... |
[Question]
[
The purpose of this challenge is to produce an ASCII version of the cover of [this great album](https://en.wikipedia.org/wiki/The_Wall) by the rock band Pink Floyd.
The brick junctions are made of characters `_` and `|`. Bricks have width 7 and height 2 characters, excluding junctions. So the basic uni... |
[Question]
[
It is well known that a person on a grid under the influence of alcohol has an equal chance of going in any available directions. However, this common-sense statement does not hold in the realm of *very small* drunkards, whose behavior is very much as if they take *every* available path at once, and th... |
[Question]
[
**Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently accepting new answers or interactions.
>
> Is it possible to write a C program that multiplies two numbers without using the multiplicat... |
[Question]
[
**In:** Enough memory and a positive integer N
**Out:** N-dimensional N^N array filled with N, where N^N means N terms of N-by-N-by-N-by...
**Examples:**
1: `[1]` which is a 1D array (a list) of length 1, containing a single 1
2: `[[2,2],[2,2]]` which is a 2D array (a table) with 2 rows and 2 columns, ... |
[Question]
[
[Dropsort](http://www.dangermouse.net/esoteric/dropsort.html), designed by David Morgan-Mar, is an example of a linear-time "sorting algorithm" that produces a list that is, in fact, sorted, but contains only *some* of the original elements. Any element that is not at least as large as the maximum of t... |
[Question]
[
>
> This is a repost [of an old challenge](https://codegolf.stackexchange.com/q/8369/8478), in order to adjust the I/O requirements to our recent standards. This is done in an effort to allow more languages to participate in a challenge about this popular sequence. See [this meta post](https://codegol... |
[Question]
[
Doing code review, I stumbled upon the following code, that tests the status of a checkbox:
```
if (!isNotUnchecked()) { ... }
```
I had to brainstorm for 30 minutes to find out what actual checkbox status the code was expecting. Please write me a program that can simplify these silly expressions!
---
... |
[Question]
[
Randall Munroe's book "xkcd, volume 0" uses a rather odd number system for the page numbers. The first few page numbers are
```
1, 2, 10, 11, 12, 20, 100, 101, 102, 110, 111, 112, 120, 200, 1000, 1001, ...
```
This looks a bit like ternary, but notice that he skips from `20` straight to `100`, from `12... |
[Question]
[
[Richard Dawkins](http://en.wikipedia.org/wiki/Richard_Dawkins) in his book The [Blind Watchmaker](http://en.wikipedia.org/wiki/The_Blind_Watchmaker), describes a [Weasel program](http://en.wikipedia.org/wiki/Weasel_program). The algorithm can be described as follows:
>
> 1. Start with a random string... |
[Question]
[
Write a regex which matches any valid [sudoku](https://en.wikipedia.org/wiki/Sudoku) solution and doesn't match any invalid sudoku solution. The input is an *unrolled* version of the sudoku, i.e. there are no line delimiters. E.g. the following board:
```
7 2 5 8 9 3 4 6 1
8 4 1 6 5 7 3 9 2
3 9 6 1 4 2... |
[Question]
[
>
> **The results are in, the contest is over.**
>
> The winner is [arshajii's](https://codegolf.stackexchange.com/users/6611/arshajii) [EvilBot](https://codegolf.stackexchange.com/a/23902/737) with 14 wins ahead of Neo-Bot with 13 wins and CentreBot and LastStand with 11 wins each.
>
>
>
**Scor... |
[Question]
[
Trump needs the wall constructed and you are going to do it! To most efficiently build his wall I have created a simple, repeatable pattern for you to use:
```
__ __
| |_| |
___| |___
- - - -
- - - - - - -
- - - - - - - -
———————————————
```
Trump will tell you how man... |
[Question]
[
Write a program or function which will provably **print all integers exactly once** given infinite time and memory.
Possible outputs could be:
```
0, 1, -1, 2, -2, 3, -3, 4, -4, …
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, -1, -2, -3, -4, -5, -6, -7, -8, -9, 10, 11, …
```
This is not a valid output, as this would n... |
[Question]
[
**Requirements:**
* Take an input on stdin including new lines / carriage returns of unlimited length (only bounded by system memory; that is, there is no inherent limit in the program.)
* Output the reverse of the input on stdout.
**Example:**
Input:
```
Quick brown fox
He jumped over the lazy dog
```... |
[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]
[
Write a program that outputs
```
Do not repeat yourself!
```
Your program code must respect the following constraints :
* its length must be an even number
* each character that is in position `2n` (where `n` is an integer > 0) must be equal to the character in position `2n-1`. The second character of... |
[Question]
[
# Inspired by, and in memory of, my dear friend and colleague,
[](http://www.dyalog.com/blog/2016/11/dan-baronet/)
# [Dan Baronet](http://www.dyalog.com/blog/2016/11/dan-baronet/), 1956 – 2016. [R.I.P.](http://danielbaronet.rip/)
He found [the shortest... |
[Question]
[
Write the shortest program that prints the sound my alarm clock makes, and stops after an inputted number of `beep`s.
For reference, here is the sound my alarm makes:
```
beep beep beep beep beep beepbeep beepbeep beepbeep beepbeep beepbeep beepbeepbeep beepbeepbeep beepbeepbeep beepbeepbeep beepbeepbe... |
[Question]
[
[Titin](https://en.wikipedia.org/wiki/Titin) is a protein found in muscle tissue. It is a pretty big protein, and its full chemical name is giant as well. Comprising 189819 characters, the full name of titin would take about 3.5 hours to pronounce. Your task is to output this entire name!
# Details
The... |
[Question]
[
[Gaussian integers](https://en.wikipedia.org/wiki/Gaussian_integer) are complex numbers of the form `a+bi` where `a` and `b` are both integers. In base -1+i, all Gaussian integers can be uniquely represented using the digits `0` and `1`, without the need for a symbol to denote sign.
For instance, `1100... |
[Question]
[
Write a program (or function) that exhibits four common [big O](https://en.wikipedia.org/wiki/Big_O_notation) [time complexities](https://en.wikipedia.org/wiki/Time_complexity) depending on how it is run. In any form it takes in a positive integer N which you may assume is less than 231.
1. When the pr... |
[Question]
[
**Input:** Two integers. Preferably decimal integers, but other forms of numbers can be used. These can be given to the code in standard input, as arguments to the program or function, or as a list.
**Output:** Their sum. Use the same format for output integers as input integers. For example, the input... |
[Question]
[
Print integers 0 to 100 (inclusive) without using characters `123456789` in your code.
Separator of numbers can be comma or [white space](https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_442) (by default <blank>, <horizontal tabulator>, <newline>, <carriage return>, <form... |
[Question]
[
Your challenge is to write a polyglot that works in different versions of your language. When run, it will always output the language version.
# Rules
* Your program should work in at least two versions of your language.
* Your program's output should *only* be the version number. No extraneous data.
*... |
[Question]
[
We all know the classic dad joke that goes something like this:
1. Somebody says a sentence to describe their self (e.g. `I'm tired` or `I'm confused`).
2. A dad-joke enthusiast comes along and replies `Hi <adjective>, I'm Dad!`, because introductions follow the same format (`I'm Peter` follows the sam... |
[Question]
[
The title says it all. Your goal is to write a program that forms a w×h rectangle of characters that can be rotated and re-run to output the number of 90° Counter-Clockwise (CCW) rotations that have been done.
For example, if the 3×2 program
```
abc
def
```
solved the problem, it would initially output... |
[Question]
[
Every digital clock contains a small creature that has to advance the time every minute [citation needed]. Due to the popularty of digital clocks and the popularity of catching them in the wild, they are nearly extinct in nature which is why in this challenge we try to automate this task:
Given your st... |
[Question]
[
Basing on [this SO question](https://stackoverflow.com/questions/37964715/convert-yyyymm-to-mmmyy).
Challenge is rather simple: given a date period in the format `YYYYMM` output it in the format `MMMYY`.
### Rules:
* The input will be a number or a string exactly 6 characters long, consisting only of d... |
[Question]
[
I got the spontaneous idea of making a series of challenges of users that have helped and continue to help the PPCG community be an enjoyable place for everyone, or maybe just specifically for me. :P
If you convert Dennis's name to an array of `1`s and `0`s where each consonant is `1` and each vowel is... |
[Question]
[
Consider these seven ASCII train cars.
**Engine (E)**
```
__
====== \/
| [] |=========
| )
================
O-O-O O-O-O \\
```
**Passenger car (P)**
```
===============
| [] [] [] [] |
===============
O-O O-O
```
**Boxcar (B)**
```
===============
|-|-| | |-|-|... |
[Question]
[
## *Why was 6 afraid of 7? Because 7 8 9!*
Given a string apply the following transformations:
* If there is a 6 next to a 7 remove the 6 (6 is afraid of 7)
* If the sequence "789" appears remove the 8 and the 9 (7 ate 9)
(If I'm not mistaken it doesn't matter what order you do the transformations in)
... |
[Question]
[
## The scenario
Lately you have been noticing some strange behavior with your favorite text editor. At first it seemed that it was ignoring random characters in your code when writing to disk. After a while you noticed a pattern; characters with odd ASCII values were being ignored. Under further inspec... |
[Question]
[
I wrote some text, but it looks too professional. I want to make it look like I was really tired when I wrote it. I need you to insert some typos.
Your challenge is to take an arbitrary single line of text, and add typos. This means that for each character, there will be a 10% chance for it to be typof... |
[Question]
[
Since I saw the first one a few years ago, I always was subjugated by this kind of word clock where the time is actually spelled out by words being lit up or not into a meaningful sentence.
[](https://i.stack.imgur.com/KwKBl.jpg)
The text displayed on... |
[Question]
[
Say I have an expression:
```
9 * 8 + 1 - 4
```
This expression can be interpreted in six different ways, depending on operator precedence:
```
(((9 * 8) + 1) - 4) = 69 (* + -)
((9 * 8) + (1 - 4)) = 69 (* - +)
((9 * (8 + 1)) - 4) = 77 (+ * -)
(9 * ((8 + 1) - 4)) = 45 (+ - *)
((9 * 8) + (1 - 4)) = 69 (-... |
[Question]
[
Remember the kids game, ['Duck, Duck, Goose'](https://en.wikipedia.org/wiki/Duck,_duck,_goose)? No? Me neither.
### The challenge
* Print the word 'duck' on individual lines an indeterminate amount of times.
* Print the word 'goose'.
* Your program ends.
### The rules
* Attempt to play the game in the ... |
[Question]
[
This is my first code golf question, and a very simple one at that, so I apologise in advance if I may have broken any community guidelines.
The task is to print out, in ascending order, all of the prime numbers less than a million. The output format should be one number per line of output.
The aim, as... |
[Question]
[
Your mission is to write the shortest valid regular expression that no string can match, empty string included.
Submissions must have this form ("literal notation"):
```
/pattern/optional-flags
```
Shortest regexp wins. The regexp size is counted in characters. (including slashes and flags)
Please expl... |
[Question]
[
# Introduction
Bad news guys - you got detention. Your English teacher doesn't understand this site and wants you to *"stop doing math on your digital dohickeys, this is English class!"*
She sentenced you to write her favorite saying on the blackboard 25 times, which will give a total of 100 lines on t... |
[Question]
[
Write a program or function that takes in a single-line string. You can assume it only contains [printable ASCII](https://en.wikipedia.org/wiki/ASCII#Printable_characters). Print or return a string of an ASCII art rocket such as
```
|
/_\
|E|
|a|
|r|
|t|
|h|
|_|
/___\
VvV
```
with the input ... |
[Question]
[
A kitten is much like a cat. Some of the main differences are cuteness, lack of intelligence, and size. Similarly, the `cat` command is different from the `kitten` command. Fortunately, there is only one difference in this case. In the kitten command, all uppercase letters are replaced with lowercase l... |
[Question]
[
The goal is to output or display an image with an € (euro) sign according to the following specs (ignoring the border of the sign).

Source: <http://en.wikipedia.org/wiki/File:Euro_Construction.svg>
Rules:
* The program / script must take the height of the ... |
[Question]
[
This Code Golf was inspired by the recent Daily WTF article [You Can't Handle the True!](http://thedailywtf.com/Articles/You-Cant-Handle-the-True!.aspx), which features a string comparison written as:
```
String yes = "YES";
if ((delay.hashCode()) == yes.hashCode())
```
Imagine the trouble it would hav... |
[Question]
[
Usually, it is said that "Doing X without Y" can be a trap to beginners writing challenges ([source](http://meta.codegolf.stackexchange.com/questions/8047/things-to-avoid-when-writing-challenges/8079#8079)). However, I am cocky and think that I can *definitely* make an X without any Ys. Randomly. Oh ye... |
[Question]
[
A *mountain* is defined to be a set of line segments whose first point has coordinates `(0,a)` where `a > 0`, and whose last point has coordinates `(b,0)`, where `b > 0`. All intermediate points have a y-coordinate (ordinate) strictly greater than 0. You are given the points on the mountain sorted in a... |
[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.
**Locked**. This qu... |
[Question]
[
Inspired by a task for Programming 101, here's a challenge that hopefully isn't too easy (or a duplicate).
## Input:
* A positive integer `n >= 1`.
## Output:
* `n` lines of asterisks, where every new line has one asterisk more than the line before, and starting with one asterisk in the first line.
## ... |
[Question]
[

Happy π Day. The goal of this question is to calculate the area for a circle of radius 3, where A = πr².
The catch is that you have to use the constant π that is defined in a different language than the one you are programming in. For example, you ca... |
[Question]
[
You may have heard of the "Hacker Logo", also called the "Hacker Emblem". It looks like this:
[](http://3.bp.blogspot.com/_-4G7w0aTpbg/Ss6YxNNOJ6I/AAAAAAAAAXA/rSmdVWvSZqM/s400/Symbol+Hacker.jpg)
This is a pattern from a mathematical simulation called t... |
[Question]
[
In the [standard loopholes](https://codegolf.meta.stackexchange.com/questions/1061/loopholes-that-are-forbidden-by-default), the following is [forbidden](https://codegolf.meta.stackexchange.com/a/1071/48934):
>
> Claiming that your answer is written in "MyOwnLanguage", where the command `x` means "rea... |
[Question]
[
[NetHack](https://en.wikipedia.org/wiki/NetHack) is a roguelike game where a player must retrieve the Amulet of Yendor from the lowest level of the dungeon. Commonly played via telnet, the entire game is represented with ASCII graphics. The game is extremely challenging and requires knowledge of many g... |
[Question]
[
This isn't very widely known, but what we call the Fibonacci sequence, AKA
```
1, 1, 2, 3, 5, 8, 13, 21, 34...
```
is actually called the *Duonacci* sequence. This is because to get the next number, you sum the previous 2 numbers. There is also the *Tribonacci* sequence,
```
1, 1, 1, 3, 5, 9, 17, 31, 5... |
[Question]
[
If you've ever played [Spacewar!](https://en.wikipedia.org/wiki/Spacewar_(video_game)), you know it was a fun game. If you haven't, know this: it was (and is) one of the very first and most important computer games. And it's still fun! The clone I grew up on is [this one](http://www.peterhirschberg.com... |
[Question]
[
It is simple. I cannot stand when people use spaces when naming files. It sometimes wrecks console commands and makes the output of ls ugly.
The challenge is to write a program (only ascii characters) which
1. renames all files (including directories) in the current directory to versions with spaces re... |
[Question]
[
**Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers.
Closed 8 years ago.
**Locked**. This question and its answers are [locked](/help/locked-posts) because the question is off-topic but has historical significance. It is not currently ... |
[Question]
[
Long-time lurker, first-time poster. So here goes.
In the Wikipedia page for [quine](https://en.wikipedia.org/wiki/Quine_%28computing%29#.22Cheating.22_quines), it says that "a quine is considered to be 'cheating' if it looks at its own source code." Your task is to make one of these "cheating quines" ... |
[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/104323/edit).
Closed 2 years ago.
[Improve this question](/posts/104323/edit)... |
[Question]
[
In Haskell the list notation:
```
[a,b,c]
```
Is just syntactic sugar for:
```
a:b:c:[]
```
And the string notation:
```
"abc"
```
Is just syntactic sugar for:
```
['a','b','c']
```
This means that the string:
```
"abc"
```
Is the same as:
```
'a':'b':'c':[]
```
# Task
Given a string you should output ... |
[Question]
[
Your challenge is to find the smoothest number over a given range. In other words, find the number whose greatest prime factor is the smallest.
A [smooth number](http://en.wikipedia.org/wiki/Smooth_number) is one whose largest prime factor is small. Numbers of this type are useful for the fast Fourier ... |
[Question]
[
## Task
Create a program that calculates the factorial of a number using no built-in factorial functions. Easy? The catch is that you must write your entire program (including testing it) in [haiku](http://en.wikipedia.org/wiki/Haiku) form.
[ is [CGCC](https://codegolf.stackexchange.com)'s official chatroom (go check it out!). Its name is a play on [the nineteenth hole](https://en.wikipedia.org/wiki/Nineteenth_hole), and it also refers to golf... |
[Question]
[
## Challenge
Given a non-empty string *S* of length *L* consisting entirely of printable ASCII chars, output another string of length *L* that consists entirely of printable ASCII chars, but is not equal to *S*.
For the purposes of this challenge, a printable ASCII char is one between U+0020 and U+007E... |
[Question]
[
Write a function or program that takes two words as input and outputs variants of the popular English tongue-twister "How much wood would a woodchuck chuck if a woodchuck could chuck wood?".
The output will use the first word four times
* How much `wood` would a `wood`chuck chuck if a `wood`chuck could... |
[Question]
[
*Inspired by [this comment...](https://codegolf.stackexchange.com/questions/61115/make-your-language-unusable#comment147104_61115)*
*Thanks to users [Step Hen](https://codegolf.stackexchange.com/users/65836/step-hen), [Wheat-Wizard](https://codegolf.stackexchange.com/users/56656/wheat-wizard), and [Den... |
[Question]
[
# Challenge description
On some channels on a popular streaming site [twitch.tv](https://www.twitch.tv) a common message people tend to spam in chats to bait people into spamming "LUL" is
```
One more LUL and I'm out
```
[LUL](http://files.gamebanana.com/img/ico/sprays/57822c19e1ad1.png) is a popular e... |
[Question]
[
**Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers.
---
This question does not appear to be about code golf or coding challenges within the scope defined in the [help center](https://codegolf.stackexchange.com/help/on-topic).
Closed 7 years ago.... |
[Question]
[
## Background
Hello golfers! I would like to learn all the programming languages! But I kinda have a short attention span... and copying all the Hello World examples gets boring... but I like fire! ^w^
## Challenge
So here is the plan! I want you all to write the smallest code that will compile, print ... |
[Question]
[
What general tips do you have for golfing in C++?
I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to C++ (e.g. "remove comments" is not an answer). Please post one tip per answer.
(Tips that apply to C as well can be found in [Tips for golf... |
[Question]
[
You must write a program or function that takes a string of brackets and outputs whether or not that string is fully matched. Your program should print a [truthy or falsy](http://meta.codegolf.stackexchange.com/questions/2190/interpretation-of-truthy-falsey) value, and IO can be in any [reasonable form... |
[Question]
[
### Challenge
Write the shortest [program or function](https://codegolf.meta.stackexchange.com/a/2422/46231) to calculate the [Luhn Algorithm](http://enwp.org/Luhn_algorithm) for verifying (credit card) numbers.
### Luhn algorithm explained
[From RosettaCode](http://rosettacode.org/wiki/Luhn_test_of_cr... |
[Question]
[
So I think we've all probably seen [this xkcd comic](http://xkcd.com/688/):
, for our purposes, is an infinite grid with integer coordinates, initially empty of sand. After each second, a grain of sand is placed at (0,0). Whenever a grid cell has 4 or more grains of sand, it spills one grain of sand to ... |
[Question]
[
In this challenge, your task is to decipher a string. Luckily, the algorithm is pretty simple: reading from left to right, each encountered digit ***N*** (0 to 9) must be replaced with the character which is ***N+1*** positions before it.
### Example
The input string `"Prog2am0in6"` would be decoded th... |
[Question]
[
Given an image that has only black and white pixels and an (x,y) location that's a white pixel, color the white pixels based on their minimal [Manhattan distance](https://en.wikipedia.org/wiki/Taxicab_geometry) from (x,y) in a path that only involves traversing other white pixels.
The [hue](https://en.... |
[Question]
[
You probably know *Conway's Game of Life*, the famous cellular automaton invented by mathematician John Conway. *Life* is a set of rules that, together, allow you to simulate a two-dimensional board of cells. The rules decide which cells on the board live and which ones die. With some imagination, you ... |
[Question]
[
You must make a [polyglot](/questions/tagged/polyglot "show questions tagged 'polyglot'") that outputs the square of the input in one language and the square root of the input in another. The shortest answer in bytes wins!
You must have a precision of at least 3 decimal places, and the input will alway... |
[Question]
[
The ancient Greeks had these things called singly and doubly even numbers. An example of a singly even number is 14. It can be divided by 2 once, and has at that point become an odd number (7), after which it is not divisible by 2 anymore. A doubly even number is 20. It can be divided by 2 twice, and t... |
[Question]
[
# Introduction
The game [Minecraft](https://minecraft.net) has a 1 in 10000 chance of showing "Minceraft" instead of "Minecraft" on the title screen.
# Your challenge
Your challenge is to code a function or program that takes no input, and on average 1 of 10000 times, returns "Minceraft" and the rest o... |
[Question]
[
# Code-Bowling
You've been hired by Brunswick Bowling to create a simple program to output the text `Code Bowling` on their monitors. This company is worth a pretty penny and you feel you can swindle them for quite the *bit* of cash.
The job description clearly states that they pay on a scoring basis ... |
[Question]
[
>
> **Entries are now closed. Any new entries or edits will not be counted in the final run.**
>
>
>
## [Join the chat!](https://chat.stackexchange.com/rooms/81666/art-attack-discussion)
## Challenge
Try to fill the canvas with as much paint as possible. Be careful of other bots that may paint over... |
[Question]
[
In 2014, demoscener Jakub 'Ilmenit' Debski [released](http://www.pouet.net/prod.php?which=62917) a 250-byte(1) procedural graphics demo for the [Atari XL](https://en.wikipedia.org/wiki/Atari_8-bit_family) called *Mona*. It's drawing the following picture(2):
[ 8 9 10 11 12 13 ( ) 15 16 ( ) 18 ...
```
Cantor's version of the game is the sequence defined by recursively filling in the seque... |
[Question]
[
The basic idea of a [kolmogorov-complexity](/questions/tagged/kolmogorov-complexity "show questions tagged 'kolmogorov-complexity'") challenge is to print a set output in the shortest code (though that meaning has changed now). We have had many of them, from [Borromean Rings](http://codegolf.stackexcha... |
[Question]
[
**Background:** Too many illegal immigrants from Blandia are crossing the border to Astan. The emperor of Astan has tasked you with digging a trench to keep them out, and Blandia must pay for the expenses. Since all typists have been furloughed until the trench is arranged, your code must be as short a... |
[Question]
[
>
> **NOTICE** - This challenge is now closed. Any new answers will be ignored and the accepted answer will *not* change
>
>
>
## Challenge
Write a valid program which, when just two characters in the program are changed, removed or added, completely changes the output.
The changed output must have... |
[Question]
[
There are [clever ways](/q/17456) of determining whether a number is a power of 2. That's no longer an interesting problem, so let's determine whether a given integer is an integer power of **-2**. For example:
```
-2 => yes: (-2)¹
-1 => no
0 => no
1 => yes: (-2)⁰
2 => no
3 => no
4 => yes: (-2)²
```
##... |
[Question]
[
[Identicons](https://en.wikipedia.org/wiki/Identicon) are small images of geometric patterns that represent the [hash value](https://en.wikipedia.org/wiki/MD5) of a string. Stack Exchange [uses](https://meta.stackexchange.com/questions/17443/how-is-the-default-user-avatar-generated) the identicons from... |
[Question]
[
In this challenge, you will be "reversing" the alphabet or swapping `a-z` with `z-a`. This is commonly known as the [Atbash](https://en.wikipedia.org/wiki/Atbash) cypher.
Because this transformation makes the output look like some foreign language, your code will need to be as short as possible.
---
##... |
[Question]
[
[Inspired by this question over at Mathematics](https://math.stackexchange.com/q/1775719/248583).
---
**The Problem**
>
> Let `n` be a natural number `≥ 2`. Take the biggest divisor of `n` – which is different from `n` itself – and subtract it from `n`. Repeat until you get `1`.
>
>
>
**The Q... |
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.