text
stringlengths
180
608k
[Question] [ Let's have a list of positive integers ``` [6,1,9,3,7,4,6,3,2,7,6,6] ``` this will represent a river. We would like to skip a stone across this river. We can throw the stone as far as we want and whatever number it lands on it will skip that many places. So if we start by throwing it 2 spaces, it will ...
[Question] [ Write a program that takes in an odd length string containing only the characters `.` and `:`. With the aid of an initially empty [stack](http://en.wikipedia.org/wiki/Stack_%28abstract_data_type%29), generate a number from this string as follows: For every character *c* in the string (going from left t...
[Question] [ The Compiler Language With No Pronounceable Acronym, abbreviated [INTERCAL](https://en.wikipedia.org/wiki/INTERCAL), is a very unique programming language. Among its unreproducible qualities are its binary operators. INTERCAL's two binary operators are **interleave** (also known as **mingle**), and **s...
[Question] [ It's likely that anyone who used Twitter a couple of months ago would know about the 'Howdy! I'm the sheriff of X" meme. Where a simple image of a sheriff is drawn with emoji, and changes to fit a theme. So I thought it was time for the Sheriff of Code Golf. Here he is: ``` ### ##### ### ...
[Question] [ You will be given two Arrays / Lists / Vectors of non-negative integers **A** and **B**. Your task is to output the highest integer **N** that appears in both **A** and **B**, and is also unique in both **A** and **B**. * You may assume that there is at least one such number. * Any [reasonable Input a...
[Question] [ ## Background A **checkered tiling** of a rectangular grid is a tiling using some polyominoes, where each region can be colored either black or white so that no two polyominoes sharing an edge has the same color. In graph-theoretic terms, the [chromatic number](https://en.wikipedia.org/wiki/Graph_color...
[Question] [ ## The problem: Given a non-empty set of points in the Cartesian plane, find the smallest circle that encloses them all ([Wikipedia link](https://en.wikipedia.org/wiki/Smallest-circle_problem)). This problem is trivial if the number of points is three or less (if there's one point, the circle has a rad...
[Question] [ Can you recover a sequence of letters from a sequence of dots and dashes? In Morse code, `x` is represented by `-..-`, but without the help of spaces, `-..---.-...` could represent `xmas`, or `dole`, or `teettteteee`, etc. I took the lyrics from "Rudolph, the Red-Nosed Reindeer" to make the following s...
[Question] [ The powers that be want to be able to quickly convert any number they have into their own number base using any format they would like. **Input** Your program must accept 3 parameters. 1. Number: The string number to be converted 2. InputFormat: the base string the number is currently in 3. OutputForm...
[Question] [ Inspired by [this](https://codegolf.stackexchange.com/questions/125470/multiply-two-strings) challenge (thanks @cairdcoinheringaahing for the title!), your task is to take two printable ASCII strings and multiply them element-wise with the following rules. ### How does it work? Given two strings (for e...
[Question] [ [Originally posted (and deleted) by *@Tlink*](/q/163907), which was most likely [inspired from this StackOverflow question](https://stackoverflow.com/q/48751320). Since it was a shame it got deleted, because it seemed like a good challenge in general, I figured I'd repost it with proper formatting an...
[Question] [ This question is based on the number-placement puzzle Towers (also known as Skyscrapers), which you can [play online](http://www.chiark.greenend.org.uk/~sgtatham/puzzles/js/towers.html). Your goal is to take a solution to the puzzle and determine the clues -- the numbers of towers visible along each ro...
[Question] [ You are given as input two strings representing positive integers in base 10, such as `"12345"` and `"42"`. Your task is to output a string containing their product, `"518490"` in this case. The twist is that you may not use any numerical types in your code. No `ints`, `float`s, `unsigned long`s, etc.,...
[Question] [ [Giuga numbers](https://en.wikipedia.org/wiki/Giuga_number) ([A007850](https://oeis.org/A007850)) are composite numbers \$n\$ such that, for each prime factor \$p\_i\$ of \$n\$, \$p\_i \mid \left( \frac n {p\_i} -1 \right)\$. That is, that for each prime factor \$p\_i\$, you can divide \$n\$ by the fac...
[Question] [ ## Background Define a **run** in a list as a maximal contiguous subsequence of identical values. For example, the list ``` 0 0 0 1 1 0 3 3 3 2 2 ``` has five runs of lengths 3, 2, 1, 3, 2 respectively. (Think of run-length encoding.) Then define a **cut operation** as removing one item from each run o...
[Question] [ Integers are tedious to represent in [Brain-Flak](https://esolangs.org/wiki/Brain-Flak). There are 8 operators: ``` () Evaluates to 1, but does not push anything on any stack [] Evaluates to an indeterminate value for the purposes of this question {} Removes the top of the stack and eval...
[Question] [ Given a positive integer `n`, output the `N`-dimensional identity "matrix", which is the `N^N` array with `1` where all the components of the indices are equal and `0` otherwise. `N^N` means N-by-N-by-N-by-... ``` 1 -> [1] 2 -> [[1,0],[0,1]] 3 -> [[[1,0,0],[0,0,0],[0,0,0]],[[0,0,0],[0,1,0],[0,0,0]],[[0...
[Question] [ Jack and Jane decided to play a game of chess to while away time. Unfortunately, Jack is rather bad at visualizing. He finds it tough to figure the moves possible for a given piece other than a pawn, of course! Your challenge is to help find Jack the possible options for a given piece (other than a paw...
[Question] [ ## The challenge Write a function that takes two positive integers \$n\$ and \$k\$ as arguments and returns the number of the last person remaining out of \$n\$ after counting out each \$k\$-th person. This is a code-golf challenge, so the shortest code wins. ## The problem \$n\$ people (numbered from ...
[Question] [ # Background One of the commonly meme'd aspects of javascript is its incredibly loose type coercion that allows for `+!![]+[+[]] == '10'` this technique can also be used to create letters as seen in the following example: ``` [[][[]]+[]][+[]][-~[]] == 'n' [undefined+[]][+[]][-~[]] // [][[]] -> undefine...
[Question] [ ## Background [**Set**](https://en.wikipedia.org/wiki/Set_(card_game)) is a card game. The deck consists of 81 unique cards that vary in four features: number of shapes (one, two, or three), shape (diamond, squiggle, oval), shading (solid, striped, or open), and color (red, green, or purple). For conve...
[Question] [ Given a strictly positive integer, return the shortest possible Roman numeral using only the additive rule. Output must consist of zero or more of each of the characters `MDCLXVI` in that order. The number `14` must therefore give `XIIII` rather than `XIV`. The characters' numeric values are `M`=1000, ...
[Question] [ A Stack Exchange script determines which five comments on questions or answers are initially seen on the main page of sites through the number of upvotes on them; the five comments with the highest number of votes are displayed. Your task is to recreate this behavior. Write a full program or function t...
[Question] [ The goal of this challenge is to (eventually) output *every* possible halting program in a language of your choice. At first this may sound impossible, but you can accomplish this with a very careful choice of execution order. Below is an ASCII diagram to illustrate this. Let the columns represent a nu...
[Question] [ The sequence [A109648](https://oeis.org/A109648) starts with the following numbers ``` 53, 51, 44, 32, 53, 49, 44, 32, 52, 52, 44, 32, 51, 50, 44, 32, 53, 51, 44, 32, 52, 57, 44, 32, 52, 52, 44, 32, 51, 50, 44, 32, 53, 50, 44, 32, 53, 50, 44, 32, 52, 52, 44, 32, 51, 50, 44, 32, 53, 49, 44, 32, 53, 48, ...
[Question] [ I noticed that it seems nobody has posted a non-ASCII ([related](https://codegolf.stackexchange.com/questions/52615/print-the-american-flag)) USA flag challenge yet, so what better time than the 4th of July? ## The Challenge Draw the current (as of 2022) flag of the United States of America. Here is th...
[Question] [ # Challenge Write code that outputs TeX (LaTeX) math-equation code (given below) that will typeset Sierpinski Triangle Fractal of 5 levels. **Shortest code wins**. # Details TeX (and friends like LaTeX, etc.) is a sophisticated typesetting system. It can render arbitrary nested complex expressions for ...
[Question] [ Imagine a continuous 2-dimensional path that can only turn left, right, or go straight, cannot intersect itself, and must fill a rectangular grid such as the grid of pixels in an image. We'll call this kind of path a *snake*. ![Snake example](https://i.stack.imgur.com/KsAUF.png) This enlarged example s...
[Question] [ Gah! It's a shame that Pokémon Sword and Shield won't introduce a new eeveelution. Let's mourn them with a code golf. The objective is to, when given a type name as the input, output the name of the corresponding eeveelution. * When given `Water`, output `Vaporeon`. * When given `Electric`, output `Jol...
[Question] [ **Warning : this is NOT a "hey, let's draw a cake in ASCII-art" challenge! Please keep reading ;)** Some time ago it was my birthday, I'm 33 now. So there is this awkward social tradition consisting in inviting family and friends, putting number-like candles on a cake, sing songs and open gifts. ``` ...
[Question] [ # The task Write a program or function whose input is a list/array *X* of integers, and whose output is a list of sets of integers *Y*, such that for each element *e* in each set *Y*[*i*], *X*[*e*] = *i*, and such that the total number of elements in the sets in *Y* equals the number of elements in *X*...
[Question] [ # Introduction I think everyone agrees that nice pictures have to have a nice frame. But most challenges on this site about ASCII-Art just want the raw picture and don't care about it's preservation. Wouldn't it be nice if we had a program that takes some ASCII-Art and surrounds it with a nice frame?...
[Question] [ # Challenge description A "derangement" of a sequence is a permutation where no element appears in its original position. For example `ECABD` is a derangement of `ABCDE`, but `CBEDA` is not: ``` ABCDE | | <- B and D are in their orignal positions CBEDA ``` Given a sequence, generate a random derange...
[Question] [ [In the United States](http://mutcd.fhwa.dot.gov/services/publications/fhwaop02090/twtmarkings_longdesc.htm), the two opposing directions of traffic on a road are separated by a dashed yellow line if passing is allowed and two solid yellow lines if passing is not allowed. ![road line rules graphic](htt...
[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/6309/edit). Closed 5 years ago. [Improve this question](/posts/6309/edit) Ru...
[Question] [ A *Munchausen Number* in base \$b\$, also known as a [Perfect digit-to-digit invariant](https://en.wikipedia.org/wiki/Perfect_digit-to-digit_invariant) or PDDI is a peculiar type of positive integer where the sum of its base-\$b\$ digits raised to themselves is equal to the number itself. They are name...
[Question] [ The [Triforce](https://en.wikipedia.org/wiki/Triforce) is a fictional artifact in [The Legend of Zelda](https://en.wikipedia.org/wiki/The_Legend_of_Zelda), made of three identical-looking equilateral triangles representing power, wisdom and courage. Several games in the saga include an animation when t...
[Question] [ "Digital sum" refers to the sum of all the digits in a number. For example, the digital sum of `1324` is `10`, because `1+3+2+4 = 10`. The challenge is to write a program/function to calculate the smallest number bigger than the input whose digital sum is the input. ## Example with walkthrough As an ex...
[Question] [ Write a program for a specific language that in different orientations performs different tasks. Your code should have at least two non-empty lines and at least two non-empty columns and should complete at least one challenge from each category of challenges below when oriented in different ways. ## Or...
[Question] [ According to [this site](http://grammar.yourdictionary.com/capitalization/rules-for-capitalization-in-titles.html#8Xf7g96YSUq87kkL.99) a general rule recommended by *The U.S. Government Printing Office Style Manual* is > > Capitalize all words in titles of publications and documents, except > a, an, ...
[Question] [ # Challenge I'm under attack by the larcenous Midnight Crew and I need to summon the [Catenative Doomsday Dice Cascader](https://www.homestuck.com/extras/20) in order to defend myself. Since I'm low on space, I need the code to be as short as possible. The algorithm for the Catenative Doomsday Dice Cas...
[Question] [ Program the shortest code that will calculate the average BPM (Beats per Minute) using 8 data points of time passed. This is my first post, and I haven't seen a question similar to this. Since I am a fan of rhythm games, it would be nice to have a small handy tool to calculate BPM using your own keyboa...
[Question] [ Related to: [Make a ;# interpreter](https://codegolf.stackexchange.com/q/121921/2867) and [Generate ;# code](https://codegolf.stackexchange.com/q/122139/2867) ## `;#` - A Whirlwind Guide This is a simple language with two commands. Its only data structure is an accumulator, which is initialized to 0. 1...
[Question] [ Given two integers greater than one, A and B, output four mathematical expressions in this order: 1. The plain expression A^B (A to the power B). e.g. if A = 2 and B = 3, `2^3`. 2. The expansion of A^B in terms of repeated multiplications of A. e.g. `2*2*2`. 3. The expansion of A^B in terms of repeated...
[Question] [ Today I realised that I often like to define sections in my code like so: ``` #################### # Helper Functions # #################### ``` But that it's tedious to do. Assuming I have a line such as this: ``` # Helper Functions # ``` What is the shortest set of `vim` keystrokes to wrap it in a `#...
[Question] [ The new site header has some bits of source code from various questions as the background. Here are the first 3 lines: ``` --<-<<+[+[<+>--->->->-<<<]>]<<--.<++++++.<<-..<<.<+.>>.>>.<<<.+++.>>.>>-.<<<+. Hello, World! IT'S SHOWTIME TALK TO THE HAND "Hello, World!" YOU HAVE BEEN TERMINATED "9!dlroW ,olleH...
[Question] [ The six main [cast members](https://en.wikipedia.org/wiki/List_of_Friends_characters#Main_characters) of the American sitcom [*Friends*](http://www.imdb.com/title/tt0108778/) all [agreed that they would be paid the same salary](http://www.factfiend.com/cast-friends-took-pay-cut-theyd-paid-amount/) thro...
[Question] [ A rotation of a string is made by splitting a string into two pieces and reversing their order, for example `"world!Hello, "` is a rotation of `"Hello, world!"`. It is possible to create programs that can be rotated to form a different, but still valid program. Consider this example in python: ``` prin...
[Question] [ You work at a beach. In the afternoon, the sun gets quite hot and beachgoers want to be shaded. So you put out umbrellas. When you put out umbrellas you want to shade the entire beach, with as few umbrellas as possible. Umbrellas come in many sizes. However, larger umbrellas are susceptible to being pu...
[Question] [ This is a somewhat [proof-golf](/questions/tagged/proof-golf "show questions tagged 'proof-golf'")-like [cops-and-robbers](/questions/tagged/cops-and-robbers "show questions tagged 'cops-and-robbers'") challenge. This is the cops' thread; [the robbers' thread is here.](https://codegolf.stackexchange.co...
[Question] [ The challenge is to write the fastest code possible for computing the [permanent of a matrix](https://en.wikipedia.org/wiki/Permanent_(mathematics)). The permanent of an `n`-by-`n` matrix `A` = (`a``i,j`) is defined as [![enter image description here](https://i.stack.imgur.com/GOz7G.png)](https://i.st...
[Question] [ You will be given a positive integer `N` as input. Your task is to build a Semi-Zigzag, of `N` sides, each of length `N`. Since it is relatively hard to clearly describe the task, here are some examples: * `N = 1`: ``` O ``` * `N = 2`: ``` O O O ``` * `N = 3`: ``` O O O O O O O ``` * `N =...
[Question] [ I didn't check [the sandbox](http://meta.codegolf.stackexchange.com/a/7435/20634) before posting this challenge - it looks like this challenge was proposed by [Cᴏɴᴏʀ O'Bʀɪᴇɴ](http://meta.codegolf.stackexchange.com/u/31957). Given an integer input, write a program that prints the "four is a magic number...
[Question] [ This is a rock: ``` * ``` Rocks can be stacked. Apart from the bottom-most layer, each rock must rest on two other rocks, like this: ``` * * * ``` You have a pile of rocks, and your boss wants you to pile them *symmetrically*, taking up the least horizontal space possible. Your challenge is to take a ...
[Question] [ The 16-color CGA palette (also known as the [HTML colors](https://en.wikipedia.org/wiki/Web_colors#HTML_color_names)) is a set of 16 colors used by early graphics adapters. The goal of this challenge is to output all 16 of them, in hex format (`RRGGBB`), in ascending order by hex value, separated by ne...
[Question] [ This is a mirror: `|`. I just found out that you can stick a mirror in the middle of a string if the string can be mirrored on itself! For example, the string `abccba`. If you cut it in half the two halves are mirror images of each other: ``` abc <--> cba ``` So, we can stick a mirror in the middle o...
[Question] [ In this challenge your goal will be to output the lyrics to Daft Punk's [Harder, Better, Faster, Stronger.](https://www.youtube.com/watch?v=gAjR4_CbPpQ) Specifically, output this text: ``` Work It Make It Do It Makes Us Harder Better Faster Stronger More Than Hour Our Never Ever After Work Is Over Wor...
[Question] [ **Goal:** Write a program or function which prints an input string in a sinusoidal shape. ### The ASCII sinusoid Here is one period of the sinusoid: ``` ....... ... ... .. .. ...
[Question] [ The look-say sequence is a sequence of lists of numbers where each element is the previous element with run length encoding. Run length encoding is the process of grouping together like elements and then giving the element and the size of the group for each group. So for example: ``` 1 1 1 2 2 1 ``` To...
[Question] [ **This is a [cops-and-robbers](/questions/tagged/cops-and-robbers "show questions tagged 'cops-and-robbers'") challenge. The robbers' thread is [here](https://codegolf.stackexchange.com/questions/167597/hardcoding-the-cops-and-robbers-robbers).** An interesting question to think about is the following:...
[Question] [ A list of numbers is called [monotonically increasing](https://en.wikipedia.org/wiki/Monotonic_function) (or nondecreasing) is every element is greater than or equal to the element before it. For example, `1, 1, 2, 4, 5, 5, 5, 8, 10, 11, 14, 14` is monotonically increasing. Given a monotonically increa...
[Question] [ This task is about compressing and processing a sequence of conditionals. --- In the game [Keep Talking and Nobody Explodes](http://www.keeptalkinggame.com/), a bomb defuser must disarm a bomb with the help of instructions relayed by experts consulting a convoluted [Bomb Defusal Manual](http://www.bomb...
[Question] [ [Merge sort](https://en.wikipedia.org/wiki/Merge_sort) is a sorting algorithm which works by splitting a given list in half, recursively sorting both smaller lists, and merging them back together to one sorted list. The base case of the recursion is arriving at a singleton list, which cannot be split f...
[Question] [ Most common computer [keyboard layouts](http://en.wikipedia.org/wiki/Keyboard_layout) have the decimal digit keys `1``2``3``4``5``6``7``8``9``0` running along at their top, above the keys for letters. Let a decimal digit's *neighborhood* be the set of digits from its own digit key and from the digit k...
[Question] [ [Sandboxed](https://codegolf.meta.stackexchange.com/a/17913/75681) Given a set of closed non-overlapping 2d contours (separated by at least one space even on diagonals) with arrows oriented consistently in the same clockwise or counter-clockwise direction (each contour has its own direction) and a posi...
[Question] [ ## Introduction Help! I accidentally dropped my TI-84 calculator out my window (don't ask how) and it broke. I have a math test tomorrow and the only calculator I can find is one with these buttons: ``` 7 8 9 + 4 5 6 - 1 2 3 * 0 = / ``` My math test is a review test on evaluating expressions. I need ...
[Question] [ I like making dank memes out of my own images. But all those so called "quick meme" sites just have *too much code*. I realized that the only way to make the dankest meme generator is to ask you guys at PPCG to golf one for me. So let me give you the low down on what you have to do. # Specs * Take an i...
[Question] [ You are paddling a canoe down a fairly fast whitewater river. Suddenly, your paddles explode, and you find yourself in a dangerous situation hurtling down a river rapid without any paddles. Luckily, you still have your programming skills, so you decide to carve a program on the side of your canoe to he...
[Question] [ You are going to be planting pumpkins soon, and you are preparing your supplies. Pumpkins come in all sorts of sizes and have their sizes written on the seed bag. A pumpkin that is size n will grow to be n units wide. However pumpkins need their space. If a pumpkin is stuck between two other pumpkins w...
[Question] [ [Resistors](http://en.wikipedia.org/wiki/Resistor) commonly have [color coded bands](http://en.wikipedia.org/wiki/Electronic_color_code#Resistor_color-coding) that are used to identify their [resistance](http://en.wikipedia.org/wiki/Electrical_resistance_and_conductance) in [Ohms](http://en.wikipedia.o...
[Question] [ As computer scientists, you're probably all familiar with the basic list operations of *pop* and *push*. These are simple operations that modify a list of elements. However, have you ever heard of the operation *flop*? (as in *flip-**flop***)? It's pretty simple. Given a number **n**, reverse the first...
[Question] [ ## Introduction On March 24th, 2015 *@isaacg* golfed [his Pyth answer](https://codegolf.stackexchange.com/a/48101/52210) from 44 to 42 bytes. Since a crossed out 44 (~~44~~) looks a lot like a regular 44, *@Optimizer* made the following comment: > > [striked out 44 is still normal 44 :(](https://codeg...
[Question] [ I'm looking out of my attic window into my neighbor's yard. They have a dog chained to a post in the center of the yard. The dog runs around the yard but is always on the end of its chain, so it ends up leaving a track in the dirt. Normally this track would be perfectly circular, but my neighbors have ...
[Question] [ ![](https://i.stack.imgur.com/YTxU0.png) ![](https://i.stack.imgur.com/Ad1WN.png) ![](https://i.stack.imgur.com/ZcwcN.jpg) ![](https://i.stack.imgur.com/bL1ae.png) ![](https://i.stack.imgur.com/ROMGD.png) It's winter, and the time of year has come for it to start getting cold (and for strange colorful ...
[Question] [ *Inspired by [this](https://codegolf.stackexchange.com/questions/187313/golf-the-smallest-circle) challenge, as well as a problem I've been working on* ## **Problem:** Given a non-empty set of points in `3D` space, find the diameter of the smallest sphere that encloses them all. The problem is trivial ...
[Question] [ Your task is to write a program that, on input n, outputs the *minimal expression* of each number 1 through n in order. The shortest program in bytes wins. A minimal expression combines 1's with addition and multiplication to result in the given number, using as few 1's as possible. For example, `23` ...
[Question] [ The turtle wants to move along the grid to get to his food. He wants to know how many moves it will take for him to get there. As well since he is slow he has teleporters set up around his domain that he will utilize if it shortens his path. Or avoid them if it lengthens his path. ## *Meet the turtle* ...
[Question] [ In this challenge you will be simulating a frog jumping from lily-pad to lily-pad in a pond. A frog's jump distance is uniquely determined by the size of the lily pad it jumps from. So for example there are lily-pads that let a frog jump `1` unit, lily-pads that let a frog jump `2` units etc. A frog ca...
[Question] [ [RFC 2550](https://www.rfc-editor.org/rfc/rfc2550) is a satirical proposal (published on April 1, 1999) for a space-efficient ASCII representation of timestamps that can support any date (even those prior to the beginning of the universe and those past the predicted end of the universe). The algorithm ...
[Question] [ The original 151 Pokemon, in an array format suitable for initializers: ``` ["Bulbasaur", "Ivysaur", "Venusaur", "Charmander", "Charmeleon", "Charizard", "Squirtle", "Wartortle", "Blastoise", "Caterpie", "Metapod", "Butterfree", "Weedle", "Kakuna", "Beedrill", "Pidgey", "Pidgeotto", "Pidgeot", "Rattata...
[Question] [ Your task is to implement integer sequence [A130826](https://oeis.org/A130826): > > **an** is the smallest positive integer such that **an - n** is an entire multiple of **3** and twice the number of divisors of **(an - n) / 3** gives the **n**th term in the first differences of the sequence produced ...
[Question] [ There's a really important problem in cellular automata called the [Majority problem](https://en.wikipedia.org/wiki/Majority_problem_(cellular_automaton)): > > The majority problem, or density classification task is the problem of finding one-dimensional cellular automaton rules that accurately perfor...
[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/4481/edit). Closed 8 years ago. [Improve this question](/posts/4481/edit) Ex...
[Question] [ You have a bunch of heavy boxes and you want to stack them in the fewest number of stacks possible. The issue is that you can't stack more boxes on a box than it can support, so heavier boxes must go on the bottom of a stack. ## The Challenge **Input**: A list of weights of boxes, in whole kg. **Output...
[Question] [ You are a railroad entrepreneur in the 19th-century United States when trains become popular because they are the most efficient means of transporting large volumes of materials by land. There is a national need for railroad tracks from the east coast through some recently colonized lands in the west. ...
[Question] [ There is a nice way to perform long multiplication for two integers without having to do anything but counting, which occasional gets shared around the internet. You write the digits of each number as a bunch of slanted lines, with the two numbers at a 90 degree angle. Then you can simply count the int...
[Question] [ Write a program or function that takes two inputs: 1. A text message 2. The dictionary of English language, as it appears in [this](https://raw.githubusercontent.com/kevina/wordlist/master/alt12dicts/2of4brif.txt) Github file (containing about 60000 words) and outputs the number of spelling errors in t...
[Question] [ This challenge is a tribute to our Legendary Challenge Writer™, [Calvin's Hobbies](https://codegolf.stackexchange.com/users/26997/calvins-hobbies) — now renamed to [Helka Homba](https://codegolf.stackexchange.com/users/26997/calvins-hobbies) —, in the same spirit as [Generate Dennis Numbers](https://co...
[Question] [ Remember those fun pinwheels that you blow on and they spin round and round? Let's code one! A pinwheel will have the set of characters `\ | / _` drawing its center and arms. One possible pinwheel could look like this: ``` | | |_ ___ ___|_| | | | ``` But what's a pinwheel...
[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/4029/edit). Closed 1 year ago. The community reviewed whether to reopen this ...
[Question] [ # Your task In your language of choice: create a program that outputs `1` This `1` may either be a string or value equivalent to the number one. # The shifting catch If you take the **unicode codepoint** (or whatever codepoint encoding your languages uses if not UTF) for each character in your program,...
[Question] [ # For the main cops' challenge, [click here](https://codegolf.stackexchange.com/questions/54464) > > **NOTICE** - This challenge is now closed. Any cracks which are posted now will not be counted on the leaderboard and the accepted answer will *not* change. > > > ## Challenge Given the original pro...
[Question] [ Given a list of digits 1 through 9, output whether each digit is grouped together as a single contiguous block. In other words, no two of the same digit are separated by different digits. It's OK if a digit doesn't appear at all. Fewest bytes wins. **Input:** A non-empty list of digits 1 through 9. Thi...
[Question] [ This is different from [My Word can beat up your Word](https://codegolf.stackexchange.com/questions/1128/my-word-can-beat-up-your-word) as it is less complex and only requires you to calculate it, and not compare them. To find the digital root, take all of the digits of a number, add them, and repeat u...
[Question] [ Inspired by [I'm not the language you're looking for!](https://codegolf.stackexchange.com/questions/55960/im-not-the-language-youre-looking-for) # Challenge Choose two different programming languages, and write a program that prints the following line to stdout (or equivalent): ``` This program errors ...
[Question] [ [Give credit to whom credit is due](http://chat.stackexchange.com/transcript/message/29674708#29674708). **Objective** Given an integer `N > 0`, out the smallest integers `A`, `B`, and `C` so that: 1. All of `A`, `B`, and `C` are strictly greater than `N`; 2. `2` divides `A`; 3. `3` divides `B`; 4. and...
[Question] [ Your network scanning tool is annoyingly picky about input, and immediately crashes if you feed it an IPv4 address that contains improper characters or isn't properly formatted. > > An IPv4 address is a **32-bit numeric address** written as four numbers separated by periods. Each number can be **zero ...
[Question] [ This simple challenge is very similar to this one: [How many days in a month?](https://codegolf.stackexchange.com/questions/146555) The only difference is you **yield the number of days in a month given the index of the month** instead of its name. The reason I ask this near-duplicate is curiosity abou...
[Question] [ # Task Your task is to take a character in: `AÁÀÃÂBCÇDEÉÊFGHIÍJKLMNOÕÓÔPQRSTUÚVWXYZaáàãâbcçdeéêfghiíjklmnoõóôpqrstuúvwxyz` and turn it into a characters in: `AAAAABCCDEEEFGHIIJKLMNOOOOPQRSTUUVWXYZaaaaabccdeeefghiijklmnoooopqrstuuvwxyz` by the obvious operation: dropping the accents in the letters. # In...
[Question] [ A [traditional Western die](https://en.wikipedia.org/wiki/Dice#Construction) is a cube, on which the integers 1 to 6 are marked on the faces. Pairs that add to 7 are placed on opposite faces. As it is cube, we can only see between 1 and 3 faces (inclusive)1 at any given time. Opposite faces can never b...