text
stringlengths
180
608k
[Question] [ Ever wonder what countries surround another? I do too, sometimes, and, well, here's the challenge for it. I have provided a list of countries and the countries that they touch that you must recognize at the bottom of this post in a code block. You need to create a full program that outputs (in the most...
[Question] [ A double precision representation of a decimal can only guarantee an accuracy of 15 decimal places, thus pi is approximated as: ``` 3.141592653589793 ``` You can see that the digit `3` is in positions `1, 10, 16`, the digit `1` is in positions `2, 4` etc. **Challenge** Your task is to create a program...
[Question] [ A [Young diagram](http://en.wikipedia.org/wiki/Young_tableau#Diagrams) is an arrangement of boxes in left-justified rows and top-justified columns. For each box, all the spaces above it and to its left are occupied. ``` XXXXX XXX XXX X ``` The [hook length](http://en.wikipedia.org/wiki/Hook_length_form...
[Question] [ Today, as I'm writing this, is March 31st. In the US, this is `3/31`. I was playing around with `331` as a number to come up with a challenge, and found that its residues (modulo small numbers) is palindromic. `331%2=1, 331%3=1, 331%4=3, 331%5=1, 331%6=1` (`11311`). Your challenge here is, when given a...
[Question] [ Create a short C program that takes an absurdly long time to compile with gcc. Entries will be scored by timing the compilation then subtracting the reference program's compile time. Rules * Any C language feature or gcc extension * gcc 4.2.1 [Answer] ``` #define a "xxxxxxxxxxx" #define b a a a a...
[Question] [ Output a random triple \$(x,y,z)\$ of real numbers such that * \$x+y+z=\frac{3}{2}\$ * Each of \$x,y,z\$, taken alone, is uniformly distributed from \$0\$ to \$1\$. Please explain in your answer what distribution your code produces and why it meets these conditions. In particular, please include a demo...
[Question] [ Define a 1-indexed sequence as follows: * `A083569(1) = 1` * `A083569(n)` where `n` is an integer greater than `1`, is the smallest integer m not occurring earlier such that `m+n` is a prime number. Your task is to take in `n` and return `A083569(n)`. ``` n A083569(n) 1 1 2 3 3 2 4 7 5 6 6...
[Question] [ There are lots of different ways to explain matrix multiplication. I'll stick with a single figure since I believe most people here are familiar with it (and the figure is very descriptive). If you want more detailed information, I suggest you visit the [Wikipedia-article](https://www.google.no/url?sa=...
[Question] [ Using the 74 characters from the [2016 time capsule string](https://codegolf.stackexchange.com/questions/105398/2016-time-capsule-string-how-versatile-is-your-language) ``` H@~*^)$.`~+1A|Q)p~`\Z!IQ~e:O.~@``#|9@)Tf\eT`=(!``|`~!y!`) Q~$x.4|m4~~&!L{% ``` write N code snippets all in the same language wher...
[Question] [ ## Introduction Don't you hate it when someone uploads an album you like to YouTube, but the description only contains a **track listing**? Like this: ``` 1. Everything in Its Right Place - 4:11 2. Kid A - 4:44 3. The National Anthem - 5:50 4. How to Disappear Completely - 5:55 5. Treefingers - 3:42 6....
[Question] [ [Gravity Guy](http://www.miniclip.com/games/gravity-guy/en/) is a game where the only user input is a single key that flips the direction of gravity. Given an ASCII art level, determine if it is possible for Gravity Guy to reach the end. --- ## Rules * The initial direction of gravity is **down**. * Th...
[Question] [ There are many formalisms, so while you may find other sources useful I hope to specify this clearly enough that they're not necessary. A RM consists of a finite state machine and a finite number of named registers, each of which holds a non-negative integer. For ease of textual input this task require...
[Question] [ # Challenge Given a square matrix of characters (single-byte printable ASCII characters), rotate each "ring" of the matrix in opposite directions. Let's take an example: ``` 1 2 3 4 5 6 7 8 9 A B C D E F G H I J K L M N O P ``` Then, the outermost ring is rotated clockwise 90 degrees, like so: ``` 1 2 ...
[Question] [ On a [toroidal square grid](https://www.google.com/search?q=toroidal+grid&sxsrf=ALeKk00zPr0KXqKlqJnTbEU7iskw6hvZ8Q:1588277096042&source=lnms&tbm=isch&sa=X&ved=2ahUKEwis5vSg-ZDpAhWCDOwKHWwhAi8Q_AUoAXoECAsQAw&biw=1920&bih=979#imgrc=DNpOW7cXm2Nv9M) (you can wrap around) where each cell indicates one direc...
[Question] [ As a follow up to [Shortest terminating program whose output size exceeds Graham's number](https://codegolf.stackexchange.com/questions/6430/shortest-terminating-program-whose-output-size-exceeds-grahams-number) and [Golf a number bigger than TREE(3)](https://codegolf.stackexchange.com/questions/139355...
[Question] [ The [Borromean rings](https://en.wikipedia.org/wiki/Borromean_rings) are a curious set of three circles, linked such that the removal of any one of them will unlink the other two: [![enter image description here](https://i.stack.imgur.com/J7tFl.png)](https://en.wikipedia.org/wiki/File:Borromean_Rings_I...
[Question] [ As many geeks may know most pages (95% i think) on wikipedia eventually lead to Philosophy like this: Click on the first non-italic or in parentheses link that is to another normal article: (i.e. not File: or Special:, but things like Wikipedia: are OK) and repeat on that one until you hit philosophy. ...
[Question] [ In this [fastest-code](/questions/tagged/fastest-code "show questions tagged 'fastest-code'") challenge, you are provided with a set of \$n\$ identical blocks and need to determine how many unique buildings can be constructed with them. Buildings must satisfy the following rules: 1. No overhangs - each...
[Question] [ > > A Primenary (*binary-prime*) string is one which, when written as a binary grid, every row and column has a prime total. > > > That's quite a vague explanation, so let's break it down with a worked example... --- For this example we'll use the string `bunny`: First, find the ASCII code point of...
[Question] [ In a very unusual accident involving a small sample of radium, an electrocuted whale, and three gummy bears, some of The Management™'s source code has been mutated. Little does The Management™'s boss know, it was actually the Cops© who had been responsible, in an attempt to thwart The Management™'s "ev...
[Question] [ # Task Write a program/function that when given a positive integer \$n\$ and a digit \$d\$ which is not 0 outputs a way to represent \$n\$ using only addition, subtraction, multiplication, exponentiation, division, concatenation, parenthesis and the digit \$d\$. # Examples ``` n = 6, d = 1 => (1 + 1...
[Question] [ Given a square string, produce all the output for the string at every stage of unfurling. The string must unfurl in a clockwise direction one quarter turn at a time. ## Examples **Input**: ``` A ``` **Output**: ``` A ``` ***Note**: I'll also accept the input duplicated for this particular test case **o...
[Question] [ Any regular hexagon can be tiled with diamonds, for instance like so: ``` ______ /_/_/\_\ /_/\_\/\_\ /\_\/_/\/_/\ \/_/\_\/_/\/ \_\/_/\_\/ \_\_\/_/ ``` We'll consider the above a tiling of size `1` (since the diamonds' sides are made of one `/` or `\` each). The same tiling of size `2` would lo...
[Question] [ iBug recently got a long bar made of composite, yet valuable materials. The bar is so long that iBug can't easily sell it for credits, so he wants to cut it. The bar is made of such fragile and magic materials that, if a part is broken, all parts of the bar made of the same material will break, too, ma...
[Question] [ *Title is made up, from 'Sequence Index Digit Not'.* ## Challenge: Given an integer `n` which is `>= 0`, output the `n`'th number of the following sequence. Here are the first 50 items, with it's (0-indexed) index above it: ``` 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27...
[Question] [ ## Challenge Here at PPCG, we sure do like our sequences, so here's ~~a fun~~ another one. Let's define `a(n)` as being *the smallest non-negative integer `X` that is not equal to any `a(k)` (`0 < k < n`), and `a(n-1)` and `X` do not share any decimal digits. `a(0) = 0`* Given an input `n > 0`, output ...
[Question] [ Yahtzee is a game played with five six-sided dice and a score sheet with thirteen different boxes to fill a score in. Each box has its own scoring rules: * 1s, 2s, 3s, 4s, 5s, 6s all score points equal to the sum of the respective dice (that is, a roll of [3, 2, 3, 1, 5] scored as 3s would be awarded 6...
[Question] [ The Microsoft FAT file system has a directory table to represent which "files" are in which "folders" on the disk. For the time, these entries crammed a lot of information into a small amount of bits. There are a bunch of technical specifications over on [Wiki](https://en.wikipedia.org/wiki/Design_of_t...
[Question] [ Given an ASCII art hexagon as input, output one whose sides are all one unit longer. ``` _____ ____ / \ / \ / \ / \ / \ \ \ => \ \ \ / \ / \____/ \ / ...
[Question] [ The [Manhattan distance](https://en.wikipedia.org/wiki/Taxicab_geometry) on a regular grid is the number of orthogonal steps one needs to take to reach one cell from another. Orthogonal steps are those that go through the edges of the grid cells (as opposed to the corners, which would give us the [Cheb...
[Question] [ A 2D board *will* contain the following objects: * `^`,`>`,`v`, or `<`: A laser emitter facing up, right, down, or left respectively. There may be more than one. Lasers will travel in a straight line in empty space (empty space is represented with a dot `.`). Lasers do not pass through emitters. * `*`:...
[Question] [ [Part 2 of the challenge is here](https://codegolf.stackexchange.com/questions/196335/country-name-mashup-generator) [Flags Mashup Bot](https://twitter.com/flagsmashupbot) is a small Twitter bot that generates a new flag based on two random flags and tweets the result every couple of minutes. ## Task ...
[Question] [ This question is inspired by, and is the inverse of [this one](https://codegolf.stackexchange.com/questions/55574/dennis-doorknob-martin-b%c3%bcttner-chris-jester-young-pizzeria). Dennis (`E`), Doorknob (`D`), Martin (`M`) and Chris (`C`) have ordered a pizza. The rectangular pizza is divided into squa...
[Question] [ Write a regular expression which matches a given string consisting of three non-negative, space-separated integers if and only if the last integer is the sum of the previous two. Answers may be for integers of any numeral system with radix between 2 and 10. ## Test cases These should fail: ``` 0 1 2 10...
[Question] [ ### [Test Driver](https://github.com/Beefster09/pcg-general/blob/master/ruins.py) • [Challenge Discussion](https://chat.stackexchange.com/rooms/92372/adventurers-in-the-ruins) • [Submit Adventurer](https://codegolf.stackexchange.com/questions/183101/adventurers-in-the-ruins#footer) ![Treasure Room](htt...
[Question] [ In the Pokemon video games, the player is sent out into the world to force wild animals into tiny balls and train them to fight. Of course, *everyone* knows that *no one* plays Pokemon for the battling. The real draw the series has is the pokemon catching itself! Your job is to simulate the pokeball du...
[Question] [ [pannenkoek2012](https://en.wikipedia.org/wiki/Pannenkoek2012) aims to complete [Super Mario 64](https://en.wikipedia.org/wiki/Super_Mario_64) with as few presses as possible of the A button, which makes Mario jump. Each "A press" consists of three parts: * Pressing the button * Holding it for any len...
[Question] [ My Downgoat avatar has several distinct features ![](https://i.stack.imgur.com/IXeTn.png) These features can however also apply to any other animal. ## Specification Given an image of an animal (technically can be anything), you must apply the Downgoat properties to it. **Border pixels** are the outer...
[Question] [ Create a program that find the latest 50 challenges with the [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'")-tag that have at least 20 answers. Then, extract the scores for each language in each of the challenges. If there are more than one answer using the same language, c...
[Question] [ *Inspired by [Hyperprogramming: N+N, N×N, N^N all in one](https://codegolf.stackexchange.com/q/92944/12012). Thanks to @MartinEnder and @trichoplax for their help in the sandbox.* # Definitions ## Hyperquines Define a **hyperquine** of order **n** as a quine-like full program or function **P** that s...
[Question] [ You have your very heavy cubical box on a flat floor at position (0,0). All you can do with it is roll it in four cardinal directions (east, north, west, south). Your task is to bring it to a target position, such that the side facing up is the same as before your manipulations. Make a program or funct...
[Question] [ This challenge was inspired by [@HelkaHomba](https://codegolf.stackexchange.com/users/26997/helka-homba)'s excellent challenge [Red vs. Blue - Pixel Team Battlebots](https://codegolf.stackexchange.com/q/48353/58826). That challenge was probably the best one I've seen on this site. Ever. My challenge i...
[Question] [ This is a `3x3` ASCII jigsaw puzzle: ``` _____ _____ _____ | _| |_ | | (_ _ _) | |_ _|_( )_|_ _| | (_) |_ _| (_) | | _ _) (_ _ | |_( )_|_ _|_( )_| | _| (_) |_ | | (_ _) | |_____|_____|_____| ``` This is also a `3x3` ASCII jigsaw puzzle: ``` _____ _____ ...
[Question] [ It is a dry summer in the prairie. The four farmers in the area realize that they can corner the market on corn by burning their neighbors crops. But they need a strategy for doing so; that is where you come in. Your task is to write a bot to tell the farmers what to burn. The goal is to finish the gam...
[Question] [ You've probably heard of the [Fibonacci numbers](http://oeis.org/A000045); they're pretty famous. Each number in the Fibonacci sequence is the sum of the last two in the sequence with the first and second numbers being 1. The sequence looks like this: ``` 1 1 2 3 5 8 13 21 34 55 89 144 233 377 610 987 ...
[Question] [ **Introduction** You are alone on an island. The remainder of humanity is dead ([probably due to the bug in user12345's code](https://codegolf.stackexchange.com/questions/23631/the-floating-horde/23657#23657)). The Zombie Pirate Horde has reached your island, and they are endless. It's time to kick ass...
[Question] [ My robot for generating [Mad Libs](https://en.wikipedia.org/wiki/Mad_Libs)-style [sequence](/questions/tagged/sequence "show questions tagged 'sequence'") challenges has gone rogue! To defeat it, I need you to write code that can solve all the challenges it can crank out. Your input is three selections...
[Question] [ Find a maximally profitable sequence of exchanges given an exchange rate table. --- As an example consider the currencies **A**riary (your home currency), **B**aht, **C**edi, and **D**enar where the rate from one to another (after any transaction rate has been levied) is given by the (row, column) entr...
[Question] [ Given a sequence of 625 32-bit unsigned integers (that is, in the range `[0, 2**32)`), output which of the following pseudorandom number generators generated the sequence: 1. [Linear Congruential Generator](https://en.wikipedia.org/wiki/Linear_congruential_generator) 2. [Xorshift](https://en.wikipedia....
[Question] [ In graph theory, a [Cactus](https://en.wikipedia.org/wiki/Cactus_graph) is a connected graph such that any distinct two simple cycles in the graph share at most one vertex. Here is a Cactus with 3 simple cycles outlined with dashed lines. [![Cactus Graph](https://i.stack.imgur.com/40a39.png)](https://i...
[Question] [ Let's map some strings to 2d space, fractal style. Your task is to compute a [Hilbert curve](http://en.wikipedia.org/wiki/Hilbert_curve) and lay a string along it. ![The Hilbert curve, iterations 1 to 8](https://upload.wikimedia.org/wikipedia/commons/4/46/Hilbert_curve.gif) ### Task The task is to take...
[Question] [ (Literally: "Does this follow/realize the *gismu*-form?") ### Premise The language [Lojban](https://en.wikipedia.org/wiki/Lojban) is a *constructed language*, meaning in part that all of its words have been created rather than allowed to develop naturally. The semantic base of Lojban are its *gismu*, o...
[Question] [ [There](https://codegolf.stackexchange.com/questions/114219/balance-the-brackets) are [a few](https://codegolf.stackexchange.com/questions/65526/bracket-balancing) questions [on this site](https://codegolf.stackexchange.com/questions/77138/are-the-brackets-fully-matched/77145) about balancing brackets,...
[Question] [ # Can these rectangles fill a rectangular space? Given a bunch of rectangles, you are asked whether or not they can be arranged to fill a rectangular space. ## Specs Given a bunch of arbitrary `m x n` rectangles; `0 <= m, n <= 1000`, determine whether or not it is possible to arrange them so that they ...
[Question] [ The idea of this challenge is to find all the words from a dictionary on a grid of letters. Your input should come from stdin or function arg and will come in the following format: ``` [your dictionary as a list of space sep words] [a grid of letters] Example: The cool car looc thea jopr ``` ### Rules ...
[Question] [ In the vein of large number challenges I thought this one might be interesting. In this challenge, we will be using the [Residue Number System](https://en.wikipedia.org/wiki/Residue_number_system) (RNS) to perform addition, subtraction, and multiplication on large integers. **What is the RNS** The RN...
[Question] [ Redstone is a material in the game Minecraft, and it is used for many complex contraptions. For this program, you will only need to simulate three items: the redstone wire (noted with R), redstone torch (noted with T), and block (noted with B). Here are a list of basic rules about how redstone works: `...
[Question] [ Many different types of train set exist, ranging from wooden tracks like Brio, to fully digital control perfect tiny metal replicas of real trains, but they all require a track to be designed, ideally using as many of your pieces as possible. So, your task is to determine whether, given input of the av...
[Question] [ The task is simple. Get me some `1000`, `500` and `100` notes. How ? you might ask. Don't worry, no need of robbing a bank as there is an ATM nearby which accepts your credit card. But your credit limit is just enough for the task so you have to be careful with the withdrawals. **Challenge** Given the ...
[Question] [ We've had lots of questions about [quine](/questions/tagged/quine "show questions tagged 'quine'")s, programs where the source code and output are identical. For compiled languages, there are other combinations: we've already had [a question](https://codegolf.stackexchange.com/q/8956) about writing a p...
[Question] [ Suppose this grid of spaces and `X`'s represents the cross section of some strangely shaped empty [ice cube trays](https://en.wikipedia.org/wiki/Ice_cube#Ice_cube_tray): ``` X X X X X X XX X XX X XXXXXX XXXXXXXXXXXXX ``` Columns without `X`'s represent holes or gaps in the trays tha...
[Question] [ This challenge is about converting 2D mazes into 1D mazes. # Overview ``` +-+-+-+-+-+-+ +-+-+-+-+-+-+ graph { | | | | |A| | B| A B A -- D + + + + +-+-+ + + + + +-+-+ \ | C -- D | | | | | | | | \ | D -- ...
[Question] [ ## Introduction Suppose for a moment that the vipers and cliff are only **two** steps away, instead of three. ``` o --- Hsss! | ';;' ___ /_\ ___ _ | ``` You are, unfortunately, a captive of a sadistic torturer. You **must** take a step either to th...
[Question] [ ## Background The United States has a unique love of gerrymandering––the deliberate manipulation of an electoral district to predict certain voting results. Just recently there was a [gerrymandering case](https://www.politico.com/story/2017/10/03/supreme-court-gerrymandering-wisconsin-arguments-243401)...
[Question] [ A fun game to play if you are bored is the [Diffy Game](http://www.cs.loyola.edu/~lawrie/CS630/F03/Projects/PA1/index.html). It is a one player game that is pretty simple and can consume a good deal of your time. The Diffy game works like as follows: You start with a list of non-negative integers, in t...
[Question] [ **Challenge** Inspired by [this challenge](https://codegolf.stackexchange.com/questions/51284/draw-an-ascii-lightning-bolt) and the nasty [Hurricane Matthew](https://www.inverse.com/article/21803-hurricane-matthew-red-sprite-lightning-storm-photography), we will be generating some lightning bolts dynam...
[Question] [ In this challenge, your task is to take an simple recording in mp3 format and find the time offsets of the beats in the file. Two example recordings are here: <https://dl.dropboxusercontent.com/u/24197429/beats.mp3> <https://dl.dropboxusercontent.com/u/24197429/beats2.mp3> Here is the third recording w...
[Question] [ In order to defend someone’s baffling decision, people often say that that person is going over everyone’s heads and playing “3-dimensional chess”. Now it’s your chance to play 3-dimensional chess! ## Rules There are many variants of [3D Chess](https://en.wikipedia.org/wiki/Three-dimensional_chess), bu...
[Question] [ I was recently adding up the ages of myself and my wife and kids and realised that at some point in the not-too-distant future our ages will all add up to exactly 100 years. # Challenge For an input consisting of a combined (total) age and a list of birth dates, output the date on which the combined ag...
[Question] [ **Closed**. This question needs to be more [focused](/help/closed-questions). It is not currently accepting answers. Closed 9 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] [ # Introduction A pure word (or perfect word), as defined by me, is a word where the sum of the position in the alphabet of each letter in the word is perfectly divisible by the total length of the word. For example, `abcb` is a perfect word because `1 + 2 + 3 + 2 = 8`, and `8 / 4 = 2`. # Your task Give...
[Question] [ **Challenge Description:** Write a program that asks the user for input. The user will enter `Good` or `Bad`. You do not have to support any other input. If the user enters `Good`, print `Bad` and vice versa (to stdout etc). **Notes:** *1)* You cannot use any other pair of two words. *2)* Your program ...
[Question] [ Display numbers from one to one-hundred (in increasing order), but number 2 shouldn’t appear anywhere in the sequence. So, for example, the numbers two (`2`) or twenty-three (`23`) shouldn't be in the sequence. Here is an example output, with newlines separating the numbers: ``` 1 3 4 5 6 7 8 9 10 11...
[Question] [ Your challenge is to take an array of strings and output the longest string in the array. So for ``` ["tiny", "small", "bigger", "biggest"] ``` the output would be `biggest`. If two elements of the array have the same length, you should choose the one that appears first in the array. That means if the ...
[Question] [ Write a program which finds the non-unique elements of an array of signed integers. The resulting array can be in any order. Your answer may be a snippet which assumes the input to be stored in a variable (`d`, say) and evaluates to the correct result. ### Test Cases Each test case is a single line in ...
[Question] [ You are an employee of Microteque, a leading Silicon Valley startup creating smart microwave ovens for all kinds of strange places. Your customers can get their microwaves printed with patterns to match their kitchens, campers, man caves; even the kitchens of large nation-state facilities have shiny ne...
[Question] [ The code should take a string as input from keyboard: ``` The definition of insanity is quoting the same phrase again and again and not expect despair. ``` The output should be like this(not sorted in any particular order): ``` : 15 . : 1 T : 1 a : 10 c : 1 e : 8 d : 4 g : 3 f : 2 i : 10 h...
[Question] [ Write a program that outputs `Hell0 W0rld!`. It must match this output exactly, including capitalization, zeroes instead of o's, exactly one space, etc. Trailing new lines are allowed. Lowest score wins. Scoring is based on the sum of the values of each character in the language's code page - otherwise...
[Question] [ **Task -** The title pretty much sums it up: raise an integer *x* to power *x*, where `0<x`. **Restrictions:** * Use of exponentiation, `exp()`, `ln()`, and any other powers-related language built-ins, like `pow()`, `x^x`, `x**x` is forbidden. * You can assume that the given integer fits the limits of ...
[Question] [ Write a program or function which takes a string of text as input and outputs the number of non-alphabetical characters in it (standard I/O rules apply). A non-alphabetical character is any character not appearing in this string: ``` abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ ``` In terms of ...
[Question] [ # Task Given an \$m\times n\$ binary ascii "photo", return the negative of the photo **Example:** ``` # # # # # # # # -> ## ## # # # ### # # # ## ## ``` # General rules: * This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest answer in byte...
[Question] [ Your task today is to write a program or function that takes an array of integers, and counts the number of times, reading it left to right, that the value changes. This is easier to show with an example: `[1 1 1 2 2 5 5 5 5 17 3] => [1 1 1 **2** 2 **5** 5 5 5 **17** **3**] => 4` Test case: ``` Input ...
[Question] [ Here's the challenge. Write some code to output all the integers in a range. Sounds easy, but here's the tricky part. It will start with the lowest number, then the highest. Then the lowest number which isn't yet in the array. Then the highest which isn't yet in it. ## Example: Lets take 1 to 5 as our...
[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/428/edit). Closed 7 years ago. [Improve this question](/pos...
[Question] [ I want to be down with the kids of the 1990's and start speaking this L33T speak of their's. For any given input I would like the resulting L33T speech as an output. I don't want to go to far down the rabbit hole so let's start simple. Consider the following replacements: B or b = 8 E or e = 3 I or i =...
[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] [ This challenge is about printing a series of growing ASCII-art arrows. I'll describe the pattern in words, but it might be easier to look at what the start of this series looks like: ``` > < -> <- --> <-- ---> <--- ----> <---- -----> <----- ------> <------ ... ``` An arrow with length n contains an arr...
[Question] [ To celebrate Rounded Pi Day, you must take advantage of today's date to make a program that takes in a circle's diameter and outputs its circumference by multiplying the diameter by 3.1416, where 3.1416 must be obtained using today's date. ``` Input 3 Output 9.4248 etc. ``` Does not take the date as in...
[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] [ This challenge is based on [this Stackoverflow question](https://stackoverflow.com/q/52202986/180719). With a positive number as input, output it as the sum of each digit multiplied by its power-of-10 representation. ## Input A number, as an integer, a string or a list of digits/characters. * The numbe...
[Question] [ Inspired by [Does the start equal the end](https://codegolf.stackexchange.com/questions/120434/does-the-start-equal-the-end) Given a string `s` and an integer `n`, output a truthy/falsey as to whether the `n`th char in `s` equals the `n`th from the end char in `s`. # Input A non-empty string and an int...
[Question] [ # Task Your task is to print this exact text: ``` A BCD EFGHI JKLMNOP QRSTUVWXY ZABCDEFGHIJ KLMNOPQRSTUVW XYZABCDEFGHIJKL MNOPQRSTUVWXYZABC DEFGHIJKLMNOPQRSTUV WXYZABCDEFGHIJKLMNOPQ RSTUVWXYZABCDEFGHIJKLMN OPQRSTUVWXYZABCDEFGHIJKLM NOPQRSTUVWXYZABCDEFGHIJKLMN OPQRSTUVWXYZABCDEFGHIJKLMNOPQ RSTUVWXYZABCD...
[Question] [ Given an array of integers, count the number of contiguous subarrays with an even sum. You may assume that the array is non-empty, and contains only non-negative integers. This is [code-golf](/questions/tagged/code-golf "show questions tagged 'code-golf'"), so the shortest code in bytes wins. ### Test ...
[Question] [ This is intended to be an easy, bite-size code-golf. The [mex](http://en.wikipedia.org/wiki/Mex_(mathematics)) (minimal excluded number) of a finite collection of numbers is the smallest non-negative integer `0, 1, 2, 3, 4, ...` that does *not* appear in the collection. In other words, it's the minimum...
[Question] [ Given: * a [blackbox function](https://codegolf.meta.stackexchange.com/a/13706/66833) \$f : \mathbb N \to \mathbb N\$, * a list of positive integers \$L\$, and * a list of indices \$I\$, apply \$f(x)\$ to the elements of \$L\$ at the indices specified in \$I\$. For example, \$f(x) = x^2, L = [7, 6, 3, ...
[Question] [ Given an array \$A\$ of positive integers between \$1\$ and \$9\$ inclusive and a positive integer \$n\$, remove all integers in \$A\$ which appear more than \$n\$ times. For example: ``` [1,2,3,2,3,2,4,1,2], n = 2 Occurrence: 1 1 1 2 2 3 1 2 4 Keep? 1 1 1 1 1 0 1 1 0 Kept values...
[Question] [ Given a list of integers produce a [Forward Difference](http://mathworld.wolfram.com/ForwardDifference.html) at a specified order/depth. For the list of integers: ``` (10, 18, -12, 4, 8, -3, -5, 67, 9, 14) ``` The Forward Differences at the various orders/depths are: ``` 0 10, 18, -12, 4, 8,...
[Question] [ Yet another Jimmy challenge by his original father. See these [other](https://codegolf.stackexchange.com/questions/187586/will-jimmy-fall-off-his-platform) [lovely](https://codegolf.stackexchange.com/questions/187682/how-many-jimmys-can-fit) [challenges](https://codegolf.stackexchange.com/questions/187...
[Question] [ Given a digit `x` (between 0 to 9, inclusive) and a number `n`, calculate the sum of the first `n` terms of the following sequence: \$x,10x+x,100x+10x+x,\dots\$ For example, if `x` is 6 and `n` is 2, then the result will be `6+66` meaning 72. There can be trailing whitespace in the output but not leadi...
[Question] [ Given a list of positive digits, return that list with consecutive elements grouped together. For example: ``` [1, 2, 3, 5, 6, 5, 4, 4, 1] -> [[1, 2, 3], [5, 6, 5, 4], [4], [1]] ``` Essentially, all adjacent elements whose absolute difference is 1 should be grouped together. The input array will only e...