text
stringlengths
180
608k
[Question] [ When I stumbled upon [this question](https://codegolf.stackexchange.com/questions/18664/lets-draw-flag-of-nepal) I remembered that I had also once seen precise rules for the construction of the South Korean flag. And this is quite a different construction. ![enter image description here](https://i.stac...
[Question] [ Inspired by a [meme](https://i.stack.imgur.com/yLbE3.jpg) I saw earlier today. # Challenge description Consider an infinite alphabet grid: ``` ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ABCDEFGHIJKLMNOPQRSTUVWXYZ ... ``` Take a word (`COD...
[Question] [ A regular string looks like this: ``` Hello,IAmAStringSnake! ``` And a string snake looks something like this: ``` Hel l rin o,IAmASt g S !ekan ``` ## Your Task String snakes are dangerous, so you must make a program that takes a string snake as input and outputs it ...
[Question] [ A *stretchy snake* looks something like this: ``` <||=|||:)~ ``` Each separate sequence of vertical bars (`|`) in a stretchy snake, known as a *stretchy portion*, is individually extendable to twice its width, and is drawn with alternating slashes (`/`,`\`) once extended. The particular snake above has...
[Question] [ I keep hearing that thinking outside the box is a goal worth achieving, but how can I tell if I'm successfully doing it? To solve this dilemma I have already wrote a *Brainwave-to-ASCII*-translator which in theory should produce outputs like ``` # +------------+ # | thinki...
[Question] [ Print the phrase `And she said, 'But that's his.'` using only the following characters: `abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ` No punctuation or non-alphabetic characters whatsoever. You can use whatever programming language you want. Whitespace is completely allowed. Shortest program w...
[Question] [ The robbers thread can be found here: [The Mystery String Printer (Robbers)](https://codegolf.stackexchange.com/questions/60329/the-mystery-string-printer-robbers) # Your challenge * Write a program, function, or REPL script that prints a string to STDOUT. * The robbers will try to create a program tha...
[Question] [ ### Intro Every year, [Dyalog Ltd.](http://www.dyalog.com/) holds a student competition. [The challenge there](http://www.dyalog.com/student-competition.htm) is to write *good* APL code. This is a language agnostic [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'") edition of ...
[Question] [ This challenge is simple enough that it's basically all in the title: you're given a positive integer **N** and you should return the smallest positive integer which is not a divisor of **N**. An example: the divisors of **N = 24** are `1, 2, 3, 4, 6, 8, 12, 24`. The smallest positive integer which is ...
[Question] [ A lipogram is a block of words that omits a particular symbol. Right now, I am avoiding our fifth symbol of 26 that commonly show up. You should know by now what I am omitting. If not, look up "lipogram" and you will know. ## Your Task With a char, a blank, and a following string (blanks may show up in...
[Question] [ Given two words, [spoonerise](https://en.wikipedia.org/wiki/Spoonerism) them by switching their initial consonant clusters. Fewest bytes wins. ``` plaster man -> master plan blushing crow -> crushing blow litigating more -> mitigating lore strong wrangler -> wrong strangler def ghi -> ghef di few years...
[Question] [ According to some [controversial story](http://www.mrc-cbu.cam.ac.uk/people/matt.davis/Cmabrigde/), the odrer of ltteres in a wrod deos not mttaer much for raednig, as lnog as the frist and lsat lteter macth with the orignial wrod. So, for fun, what would be the shortest function to randomize letter or...
[Question] [ [XKCD #99](http://xkcd.com/99/), with the title "Binary Heart" shows a simple image of ones and zeros, with some digits colored red. [![enter image description here](https://i.stack.imgur.com/Lc6Fu.jpg)](https://i.stack.imgur.com/Lc6Fu.jpg) The red heart is visible to the naked eye, but the message hi...
[Question] [ Inspired by Alex's glorious [Learn you an R for great good,](http://chat.stackexchange.com/transcript/message/26140903#26140903) we are going to humbly recreate Alex's "one true R program" -- but with a twist. Alex-style Addition works like this -- it has a 90% chance of simply returning the sum of the...
[Question] [ In a [programming language](http://meta.codegolf.stackexchange.com/a/2073/26997) of your choice, write 95 programs, each of which outputs a different one of the [95 printable ASCII characters](https://en.wikipedia.org/wiki/ASCII#Printable_characters) ***without that character occurring anywhere in the ...
[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 8 years ago. **Locked**. This qu...
[Question] [ Many of you may have interacted with people from Russia on the internet at some point, and a subset of you may have noticed the slightly odd method they have of expressing themselves. e.g. `удали игру нуб)))` where the `)))` are added for emphasis on the previous statement, I have been working on a the...
[Question] [ When playing Rock-Paper-Scissors-Lizard-Spock, your [robot reflexes](https://www.youtube.com/watch?v=Qb5UIPeFClM) let you see your opponent's throw before they make it. You just need to choose a throw that beats theirs, in as few bytes as possible of course. There's always two winning throws, and eith...
[Question] [ Given a nonempty array of positive integers, "increment" it once as follows: * If all the array elements are equal, append a `1` to the end of the array. For example: ``` [1] -> [1, 1] [2] -> [2, 1] [1, 1] -> [1, 1, 1] [3, 3, 3, 3, 3] -> [3, 3, 3, 3, 3, 1] ``` * Else, increment the first element in the...
[Question] [ As is [well known](https://es.pinterest.com/giddyupingo/chuck-norris-counted-to-infinity-twice/), > > Chuck Norris counted to infinity. Twice > > > [Besides](https://9gag.com/gag/avnxB3X/chuck-norris-has-counted-to-infinity-backwards), > > Chuck Norris can count to infinity backwards. > > > Als...
[Question] [ # Challenge Write a program that takes as input a day from April 30, 1789 to August 21, 2019 and returns as output who was president of the USA that day. # Notes For the [list of US presidents](https://en.wikipedia.org/w/index.php?title=List_of_presidents_of_the_United_States&oldid=911603941#Presidents...
[Question] [ Your challenge is given an input of a prison layout to work out whether any of the prisoners can escape. **Input** Input may be in any reasonable format such as a string, array, array of arrays etc. The input will consist of three characters, in this case `#`, `P` and space. The input will not necessar...
[Question] [ No one is quite certain what the emoticon `>:U` is intended to represent, but many scholars believe it looks like an angry [duck](https://en.wikipedia.org/wiki/Duck). Let's assume that's the case. ## Task Given an integer *n* between 0 and 3 inclusive, print or return ``` quack ``` if *n* = 0, ``` >:U ...
[Question] [ Many people consider RPS to be a game of chance. If both players play unpredictably, the best strategy is to play randomly. However, let's introduce a bit of predictability to it. Each bot will have a chance to tell the other bot what it's going to play simultaneously. Then there is a pause in which e...
[Question] [ # Hunger Gaming - Eat or Die If you don't eat, you die. If you eat, you live (until you die). You *will* die, so try to die last. ## Overview There is an island populated with a herd of prey animals. You control a pack of five predators. Your object is to keep your pack alive. Do this by eating prey. T...
[Question] [ We have some new ~~sheriffs~~ moderators in town, [Mego](https://codegolf.stackexchange.com/users/45941/mego) and [DJMcMayhem](https://codegolf.stackexchange.com/users/31716/djmcmayhem). We need a challenge to properly honour them for their new positions, so there we go. Here's something that has caug...
[Question] [ ## The scenario After a long day's work slogging in the office and browsing [stackexchange.com](http://stackexchange.com), I finally walk out the door at 16:58, already weary with the day. Because I am still only an intern, my current mode of transportation is on bicycle. I head over to my trusty [Peug...
[Question] [ This might be a very simple challenge, but I am surprised it hasn't been done on code-golf yet: **Print all Integers from 1 to 10 inclusive in ascending order to standard output.** Your output format can be whatever your language supports. This includes arbitrary separators (commas, semicolons, newline...
[Question] [ In this challenge, the goal is to recreate the [On-Line Encyclopedia of Integer Sequences](http://oeis.org) one sequence at a time. Similar to the [Evolution of Hello World](https://codegolf.stackexchange.com/q/40376/2867), each answer depends on a previous answer. Over time, this challenge will create...
[Question] [ ## Introduction In the error outputs of some languages such as Java, a **pointer** is shown to give the programmer an idea of exactly where the error went wrong. Take [this example](http://ideone.com/jd94Vy) on Ideone: ``` Main.java:12: error: ';' expected Invalid Java! ^ ``` Notic...
[Question] [ Create a program that outputs `Hello, World!` The winner is the source code that is the biggest, subject to the constraint that it is *irreducible* For this challenge, *irreducible* means there does not exist a program that outputs `Hello, World!` that can be constructed by removing characters from the...
[Question] [ [Jelly](https://github.com/DennisMitchell/jelly) is a [tacit](https://en.wikipedia.org/wiki/Tacit_programming), golf-oriented programming language by our very own [Dennis](https://codegolf.stackexchange.com/users/12012/dennis). It’s popping up in answers here more and more often, beating other golf-y l...
[Question] [ ## Your Task: Write a program or function to check if a number that is inputted is a [*Fibonacci number*.](https://en.wikipedia.org/wiki/Fibonacci_number) A Fibonacci number is a number contained in the Fibonacci sequence. The Fibonacci Sequence is defined as: `F(n) = F(n - 1) + F(n - 2)` With the see...
[Question] [ Little Chandler is sad. Draw him a cloud to cheer him up. *Note: Drawing a cloud won't actually cheer him up.* A circle can be defined as a 3-tuple `(x,y,r)` where `x` is the x position of the circle on a Cartesian plane, `y` is the y position of the circle on a Cartesian plane, and `r` is the radius...
[Question] [ The [ASCII characters](http://www.asciitable.com/) from decimal code 33 to 126 are: ``` !"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~ ``` Notice that in most fonts, 25 of these characters have "holes" in them: (a [genus greater than 0](http://en.wikipedi...
[Question] [ You may remember in first or second grade using **expanded form** to learn about place value of numbers. It's easier to explain with an example, so consider the number `123`. In expanded form it is represented as `100 + 20 + 3`, which helps a young mind visualize place value. It is reminiscent of how y...
[Question] [ Unless you have a userscript that modifies the site's design (or even if so), you should have noticed that we have our site design! [(It's November now)](https://chat.stackexchange.com/transcript/message/50642664#50642664) So, to celebrate, let's make a program that retroactively applies this design (o...
[Question] [ ## Challenge: In the programming language of your choice, take no input and output your programming language's name. Fair enough, right? **Restrictions:** * You can't use any character that is included in your programming language's name in your code. E.g., if I use Batch, I must not use the chars 'B' ...
[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. T...
[Question] [ # Winner: [Aditsu's CJam answer](https://codegolf.stackexchange.com/questions/32267/play-the-bzzt-game/32287#32287)! A whopping 25 bytes! Nice! You may continue to submit your answer, however you can no longer win. Original post kept for posterity: --- The "Bzzt" game is a game where you must count to ...
[Question] [ A challenge I thought that would be very cool is to make an [interpreter](https://en.wikipedia.org/wiki/Interpreter_(computing)) for a [Turing-complete](https://stackoverflow.com/a/7320/5615509) language of your choosing. **The rules are simple:** 1. You may use any language to create this interpreter ...
[Question] [ Your goal is to create an alphabet song as text in the following form (in order): ``` A is for <word starting with A> B is for <word starting with B> C is for <word starting with C> ... Z is for <word starting with Z> ``` ### Example output: ``` A is for Apple B is for Banana C is for Carrot D is for D...
[Question] [ A [Narcissistic Number](https://en.wikipedia.org/wiki/Narcissistic_number) is a number which is the sum of its own digits, each raised to the power of the number of digits. For example, take \$153\$ (3 digits): > > \$1^3 + 5^3 + 3^3 = 153\$ > > > \$1634\$: > > \$1^4 + 6^4 + 3^4 + 4^4 = 1634 = 1 + ...
[Question] [ Given a list of `(key, value)` pairs, determine whether it represents a function, meaning that each key maps to a consistent value. In other words, whenever two entries have equal keys, they must also have equal values. Repeated entries are OK. For example: ``` # Not a function: 3 maps to both 1 and 6 ...
[Question] [ ### Background When I was in elementary school, we used to play a game in math class that goes as follows. All kids sit in a big circle and take turns counting, starting from **1**. However, the following numbers must be skipped while counting: * Numbers that are multiples of **3**. * Numbers that hav...
[Question] [ Players of the traditional board game Go measure their skill in a [system of ranks](https://en.wikipedia.org/wiki/Go_ranks_and_ratings): * Players new to the game are ranked 30th *kyū* (written `30k`) and progress **counting down** to 1st *kyū* (written `1k`). These are considered the *student* ranks. ...
[Question] [ # Tournament over! The tournament is now over! The final simulation was run during the night, a total of \$3\*10^8\$ games. The winner is [Christian Sievers](https://codegolf.stackexchange.com/users/56725/christian-sievers) with his bot [OptFor2X](https://codegolf.stackexchange.com/a/177986/79994). Chr...
[Question] [ Remember those brute-force programs to crack password that show every combination they are trying? More precisely, at one point, the *n* first characters are fixed (they have been guessed successfully), and every possible character for the remaining ones is being tested. You've probably seen some in mo...
[Question] [ # Description Here's a very superstitious hotel elevator in Shanghai:                [![enter image description here](https://i.stack.imgur.com/cqpmlm.jpg)](https://i.stack.imgur.com/cqpmlm.jpg) It avoids the number 13, because thirteen is unlucky in the Western world, and it avoids the digit 4, becaus...
[Question] [ # Reading the text of the millitext font There is a font [here](http://www.msarnoff.org/millitext/) that fits each character into a single, 1x5 pixel block. It does this (assuming you're using an LCD screen) by using the RGB channels of each pixel to expand the one pixel into three subcolumns, one for ...
[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/25670/edit). Closed 6 years ago. [Improve this question](/posts/25670/edit) ...
[Question] [ This seems almost trivial, but since after some effort I was not able to beat the literal solution in J, I thought it might make a decent challenge (though, to be clear, this is not a J-specific challenge). Title says it all. You simply need to write a program, or function (taking no arguments) that re...
[Question] [ # Introduction In number theory, a number is considered evil if there are an even number of 1's in its binary representation. In today's challenge, you will be identifying whether or not a given number is evil. # Challenge Your job is to write a full program or function which accepts a single, non-nega...
[Question] [ Input must not be required, and output must read "`All your base are belong to us`". Restrictions * No external resources. Plus a minimum of two of the following: * You cannot use "a", "b", "t", "u", or "y" in any case in your code (bonus -10 to your golf score if you can do this) * You cannot use "l",...
[Question] [ `yes`, from coreutils, is [91 lines long](http://git.savannah.gnu.org/cgit/coreutils.git/tree/src/yes.c?id=8e93dc629727140e950a709008f9a17ca461af63). Many of them are comments, but that is still **WAY** too long. Edit from September 2019: the source file grew over the past five years and is now 126 lin...
[Question] [ Write a program or function that outputs an `L` if run on a little endian architecture or a `B` if run on a big endian architecture. Lower case output `l` or `b` is also acceptable. There is no input. Scoring is code golf, so the code with the fewest bytes wins. **Edit:** *As per the comments below, I ...
[Question] [ Today, we're going to make an ASCII hexagon. You must write a program or function that takes a positive integer *n*, and outputs a hexagon grid of size *n*, made up of asterisks. For example, a hexagon of size 2 looks like this: ``` * * * * * * * ``` While a hexagon of size 3 looks like this: ``` *...
[Question] [ Write a function, `f`, that takes in a positive integer and returns a function. The new function returned should be identical to `f`. However, when the "termination call" happens, `f` should instead return the sum of all integers passed. For example, `g=f(4)` (if `f` is the first function) should set ...
[Question] [ There have been a billion iterations of Fibonacci challenges on this website, so lets spice things up with a Fibonacci challenge of a billion iterations! Your challenge is to output the first 1000 decimal digits of the 1,000,000,000th Fibonacci number with as short a program as possible. This may then ...
[Question] [ We define **whitespace** to be any of the three characters, tab (0x09), newline (0x0A) or space (0x20). For this challenge, you're to write two programs or functions in the same programming language, which perform the following tasks: 1. Count the whitespace characters in a given string. For instance, ...
[Question] [ This challenge is in honor of mathematician [John Conway](https://en.wikipedia.org/wiki/John_Horton_Conway) who [passed away April 11, 2020 due to COVID-19](https://dailyvoice.com/new-jersey/mercer/obituaries/covid-19-kills-renowned-princeton-mathematician-game-of-life-inventor-john-conway-in-3-days/78...
[Question] [ [Winter Bash 2014](http://winterbash2014.stackexchange.com/) is on its prime and don't we all love the hats? Especially the secret hats! So why not draw one of secret hats? ## The challenge Your task is to draw the Warm Welcome Hat in proportion, in a language of your choice and having an exact constru...
[Question] [ ### Challenge: Given a string `s` on the characters `a`-`z`, `A`-`Z`, `0`-`9`, append the length of `s` to itself, counting the additional character(s) in the length as part of the total length of `s`. ### Input: Just a string of arbitrary length (can be empty). ### Output: The same string, but with it...
[Question] [ The video game [Minecraft](http://en.wikipedia.org/wiki/Minecraft) is all about placing and removing different types of blocks in the 3D [integer lattice](http://en.wikipedia.org/wiki/Integer_lattice) that makes up the virtual world. Each lattice point can contain exactly one block or be empty (an "[ai...
[Question] [ Your should write a program or function that takes a 4-character string as input and outputs a value indicating if the string is an English word or not. You are allowed to make mistakes in 15% of the provided testcases. ## Input details: Input is a 4-character string containing only the lowercase Engli...
[Question] [ # Context At Hogwarts School of Witchcraft and Wizardry, students are sorted into 4 houses, `Gryffindor`, `Ravenclaw`, `Slytherin` and `Hufflepuff`. This sorting is done by a magical hat, called the Sorting Hat. # Task Your task is to code a sorting hat. In other words, you should create some determini...
[Question] [ [Minesweeper](https://en.wikipedia.org/wiki/Minesweeper_(video_game)) is a popular puzzle game where you must discover which tiles are "mines" without clicking on those tiles. Each tile is either a mine (represented by `*`) or a clue, i.e. a number from 0 to 8 representing how many of the 8 neighboring...
[Question] [ [2048 is an incredibly fun and addictive game](http://git.io/2048) in which the goal is to create a tile with 2048 on it. Here's a short description of the game: --- Pressing an arrow key will slide all the blocks in the stage in that direction. For example, if `x` represents a block, and you pressed t...
[Question] [ # Challenge Write a program that outputs the lyrics to 99 Bottles of Beer, ***but*** instead of "beer", output "fizz" if the number of bottles on the wall is a multiple of 3, "buzz" if it is a multiple of 5, and "fizzbuzz" if it is a multiple of 3 and a multiple of 5. If the number of bottles on the wa...
[Question] [ A maze on an N by N grid of square cells is defined by specifying whether each edge is a wall or not a wall. All outer edges are walls. One cell is defined as the ***start***, and one cell is defined as the ***exit***, and the exit is reachable from the start. The start and exit are never the same cell...
[Question] [ ## Task Given a non-negative integer \$n\$, evaluate the factorial \$n!\$. The factorial is defined as follows: $$ n!=\begin{cases}1 & n=0\\n\times(n-1)!&n>0\end{cases} $$ ## Rules * All default I/O methods are allowed. * Standard loopholes are forbidden. * Built-ins are allowed. * There is no time or ...
[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/23662/edit). Closed 7 years ago. [Improve this question](/p...
[Question] [ In an [earlier challenge](https://codegolf.stackexchange.com/questions/188988/ddoouubbllee-ssppeeaakk) I asked code golfers to produce strings which copy each character in a string. For example: ``` TThhiiss iiss ddoouubbllee ssppeeaakk!! ``` This challenge is simply to detect if some text meets the...
[Question] [ For any positive 32-bit integer (`1 ≤ n ≤ 0xFFFFFFFF`) output the number of bits needed to represent that integer. # Test cases ``` | n | n in binary | bits needed | |----------------------------------| | 1 | 1 | 1 | | 2 | 10 | 2 | | 3 | 11 | ...
[Question] [ Inspired by [this default for IO](http://meta.codegolf.stackexchange.com/a/5330/44713). ## The Task Write a program that, given an input integer `x` between 0 and 255, crashes with exit code `x`. ## Restrictions * You may not call anything which is intended directly for exit code output (`System.exit(x...
[Question] [ Here is a relatively simple challenge for you. Given a string of length **N**, output the string forwards, then backwards, then forwards, then backwards... etc. **N** times. For example, if your input was ``` Hello! ``` You should output: ``` Hello!!olleHHello!!olleHHello!!olleH ``` You may also optio...
[Question] [ Given a number `n >= 2`, output all the positive integers less than `n` where `gcd(n, k) == 1` (with `k` being any one of the output numbers).  Numbers of this sort are **coprime** to each other. Example: `10` gives the output `[1, 3, 7, 9]` (in any form you like, as long as the numbers are unambiguous...
[Question] [ A string is considered to be square if the following conditions are met: * Each line has the same number of characters * The number of characters on each line is equal to the number of lines. Your task is to write a program or function which determines whether or not a given input string is a square. ...
[Question] [ You are required to generate a random 18-hole golf course. Example output: ``` [3 4 3 5 5 4 4 4 5 3 3 4 4 3 4 5 5 4] ``` Rules: * Your program must output a list of hole lengths for exactly 18 holes * Each hole must have a length of 3, 4 or 5 * The hole lengths must add up to 72 for the entire course *...
[Question] [ **Final Standings** ``` +----------------------------------+---------+---------+---------+----------------------------+ | Name | Score | WinRate | TieRate | Elimination Probability | +----------------------------------+---------+---------+---------+---------------------...
[Question] [ Given one of the 50 U.S. [state names](https://en.wikipedia.org/wiki/List_of_states_and_territories_of_the_United_States#States) on the left as input, output its two-letter [postal code](https://en.wikipedia.org/wiki/List_of_U.S._state_abbreviations#Postal_codes) as shown to the right: ``` Alabama ...
[Question] [ The day this post was published was Christmas Eve. Tomorrow will be Christmas. Yesterday was Christmas Eve Eve. In two days it will be ``` Christmas Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve Eve E...
[Question] [ Write a program that outputs its input unchanged. However: * If all uppercase characters are removed from the program, it lowercases all uppercase letters. * If all lowercase characters are removed from the program, it uppercases all lowercase letters. Transforming characters beyond the basic Latin `[A...
[Question] [ # Alphabet Rain ## The Task: The basic premise is to print out the input string and then repeat each character vertically, based on it's (0-indexed) position in the (case-insensitive) alphabet `A-Z`. `A` is at location 0 so is not repeated, `e` is at position 4 so is repeated 4 times, `P` is at positio...
[Question] [ Write program or function which will take left and right value of dice as integers (1-6) and return value on top. Dice layout: ``` +---+ | 1 | +---+---+---+---+ | 2 | 3 | 5 | 4 | +---+---+---+---+ | 6 | +---+ ,^. <´ 5 `> <-- Top value |`._,´| .6 | 4, <-- Side values `.|,´ ``` So in...
[Question] [ Write a program which, according to whether the script has access to the internet, produces an output which is ["Truthy/Falsey"](http://meta.codegolf.stackexchange.com/questions/2190/interpretation-of-truthy-falsey). You may try and connect to any existing site, **at your own discretion** (don't use a ...
[Question] [ The function TREE(k) gives the length of the longest sequence of trees T1, T2, ... where each vertex is labelled with one of k colours, the tree Ti has at most i vertices, and no tree is a [minor](https://en.wikipedia.org/wiki/Graph_minor) of any tree following it in the sequence. TREE(1) = 1, with e.g...
[Question] [ For the purpose of this challenge, we'll define **whitespace** as *only* linefeeds (0x0A) and spaces (0x20). Note that most languages and regex flavours consider many other characters as whitespace as well, both inside and outside the ASCII range so you might not be able to make use of the correspondin...
[Question] [ This is what we'll call a bowl of alphabet soup - a roughly circular ascii-art shape with the 26 uppercase English letters (A-Z) arranged clockwise to form the perimeter: ``` XYZABC VW DE U F T G S H RQ JI PONMLK ``` Write a program that takes in a single le...
[Question] [ Your task is to create a program which takes a black-and-white outlined image (example images are below) and fills it in with colour. It is up to you how you section off each region and which colour to fill it with (you could even use an RNG). For example: ![output for example 1](https://i.stack.imgur....
[Question] [ PPCG user and elected mod, [@Dennis](https://codegolf.stackexchange.com/users/12012/dennis) just became the second ever user to earn over 100k rep! [![enter image description here](https://i.stack.imgur.com/5ME5N.png)](https://i.stack.imgur.com/5ME5N.png) This is a totally original idea, that I [did no...
[Question] [ Write a program that takes in an integer N via stdin or the command line. If N is 0, the single letter `O` must be printed to stdout. --- If N is *positive*, this **horizontal** ASCII art [double helix](http://en.wikipedia.org/wiki/Nucleic_acid_double_helix), drawn N segments wide, must be printed. If ...
[Question] [ > > Your kindly neighbour, Doctor Tree, just gave you three magical creatures called Codémon. There's a battle tournament in the nearby town of Colorville. Are you the very best, like no one ever was? > > > ## Overview This is a battle tournament. Each player controls a team of three monsters, and ...
[Question] [ Some time ago, the following question was asked: [GolfScript, CJam, or Pyth?](https://codegolf.stackexchange.com/q/54385/903) Based on the title only, I thought that it would be a very nice challenge, but unfortunately, it turned out to be a question asking for tips. Here is the challenge I wanted to r...
[Question] [ Write a script that outputs `A` to stdout infinitely. There should be no newlines or separators between the characters. Standard loopholes apply. This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"). The shortest solution in each language wins. [Answer] # x86-16, IB...
[Question] [ # Challenge The goal is to output `Buffalo buffalo Buffalo buffalo buffalo buffalo Buffalo buffalo`. [Context](https://en.wikipedia.org/wiki/Buffalo_buffalo_Buffalo_buffalo_buffalo_buffalo_Buffalo_buffalo). (Maybe another interesting challenge could be printing all of the [other examples](https://en.wi...
[Question] [ # Task Given a non-negative integer `n`, output `1` if `n` is `0`, and output the value of `n` otherwise. # Input A non-negative integer. * If you would like to accept the string as input, the string would match the following regex: `/^(0|[1-9][0-9]*)$/`, i.e. it must not have any leading zeroes, excep...
[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 8 years ago....
[Question] [ It's not too important anymore, but occasionally [somebody](https://superuser.com/questions/208312/how-to-tell-if-a-windows-computer-has-a-64-bit-cpu-or-os) needs to know. Here is a simple golf: Taking no user input, tell me if the computer on which the code is run is on a 64-bit operating system, or a...
[Question] [ ## Challenge Print the following characters: ``` abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890 ``` The catch is that you may not use any one of them in your code. You may print them in arbitrary order, with or without a leading or trailing newline, but you may not print any other char...