text
stringlengths
180
608k
[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/80786/edit). Closed 7 years ago. [Improve this question](/posts/80786/edit)...
[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/11654/edit). Closed 7 years ago. [Improve this question](...
[Question] [ Write a program which outputs the square root of a given number in the shortest time possible. ## Rules It may not use any builtins or powering with non-integers. # Input format * as a function argument * as a command line argument * as a direct input on stdin or a window Your entry hasn't to be ...
[Question] [ In this challenge, you will take an input image and crop it to make a square, leaving only the central part of the input image. The answers must work with landscape, portrait, or square input images. The width of the output image should be equal to the shortest side of the input image e.g. the result...
[Question] [ Ok, so the input here is going to be a .csv file and so is the output. Now, given a .csv file/input like so ``` "apple","banana","apple,banana","orange" "grape","orange","grape,orange","sprout" # 0 1 2 3 ``` strip out all commas for a given nth column's entries (index starts...
[Question] [ **This question already has answers here**: [Implement hyperexponentiation/tetration without the use of '^' [closed]](/questions/5562/implement-hyperexponentiation-tetration-without-the-use-of) (47 answers) Closed 8 years ago. ## The challenge Implement the C equivalent of the `pow()` function...
[Question] [ **This question already has answers here**: [Reverse stdin and place on stdout](/questions/242/reverse-stdin-and-place-on-stdout) (140 answers) Closed 4 years ago. Simple problem, create a programme that takes one input, and the outputs that input in reverse. Some test cases are [input -> outp...
[Question] [ Your job is to find the location (read index) of a given element `X` in an array gone through the following transformation process: 1. Take a fully sorted integer array of size `N` (`N` is known implicitly) 2. Take any random number of mutually exclusive even index pairs (as in that no index appears ...
[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. [Improve this que...
[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/199693/edit). Closed 3 years ago. [Improve this question](/posts/199693/edi...
[Question] [ # Challenge Given two non negative integers `a < b`, output all countries, from the below Top 100 Countries, where area is between `a` and `b`: `a<= area <= b`. # Example ``` 147500,180000 --> uruguay, suriname, tunisia, bangladesh 1200000,1300000 --> peru, chad, niger, angola, mali, south africa 1...
[Question] [ **This question already has answers here**: [Random Capitalization](/questions/149491/random-capitalization) (69 answers) Closed 4 years ago. SOMe PEOPle lIkE tO TYpE iN A LoGiCAL MAnNER, WITh CapITals aT tHe bEGiNnIng Of ThE SENtENCE and smaLl LETTErS EVeRYWHErE eLsE. NOT Us. NOt Us. Your joB...
[Question] [ **This question already has answers here**: [Why isn't it ending? [closed]](/questions/24304/why-isnt-it-ending) (73 answers) Closed 9 years ago. Now that we have [over a hundred ways to get stuck in a loop](https://codegolf.stackexchange.com/questions/33196/loop-without-looping), the next cha...
[Question] [ **Implement `String.prototype.toLowerCase()`** **Description** The `toLowerCase` method returns the value of the string converted to `lowercase`. toLowerCase does not affect the value of the string itself. **Conditions** Let count chars inside function and ignore all bootstrap code: ``` String.protot...
[Question] [ This is a slightly different code golf from the usual problems. I'm forced to work with Java at my workplace and I'm increasingly annoyed at what I must do to read a file into memory to a String so I can operate on it in a normal way. The golf is this: What is the shortest possible function to dump a...
[Question] [ Assignment is simple to explain: write the shortest code you need to determine whether an executable binary program supplied as parameter is 32 or 64 bits. If there is a different kind of bitness, you can also do for it, but is not mandatory. What I really don't want is telling me you support other b...
[Question] [ **This question already has answers here**: [Rotate simple ASCII art [closed]](/questions/20154/rotate-simple-ascii-art) (11 answers) Closed 9 years ago. Given an input of a 2 dimensional array of integers, rotate the array 90 degrees clockwise. It should work for rectangular arrays of all siz...
[Question] [ Given a specific date, have the code output a relative reference: 1. If the date entered is ahead of the current date, express as "x days from now" or "x weeks, y days from now", or "x years, y weeks, z days from now". Zero units need not be mentioned. 2. If the date is the current simply have it out...
[Question] [ Given the following test, implement an `addOne` function in C# so it passes, without any modification to the test. TIP: Yes, it is possible. ``` [TestMethod] public void TheChallenge() { int a = 1; addOne(a); Assert.IsTrue(a == 2); } ``` **EDIT:** clarified the Assert to avoid confusion. ...
[Question] [ **This question already has answers here**: [Am I perfect (number)?](/questions/58026/am-i-perfect-number) (20 answers) [Am I a Sophie Germain prime? [duplicate]](/questions/131604/am-i-a-sophie-germain-prime) (28 answers) [Test a number for narcissism](/questions/15244/test-a-number-for-na...
[Question] [ * Mike Bufardeci (Pyth) - 175 bytes * Leo (Retina) - 175 bytes * devRicher (Lua) - 182 bytes * Peter Taylor (CJam) - Waiting for clarification * Lyth (C++11) - Waiting for clarification --- **Edit: Several changes made, should not affect any already submitted answers.** **Edit #2: Very few people are...
[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 ag...
[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/19225/edit). Closed 7 years ago. [Improve this question](/posts/19225/edit)...
[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/189733/edit). Closed 4 years ago. [Improve this question](/posts/189733/edi...
[Question] [ In the old DOS operating system, a number of characters were provided to draw boxes. Here is a selection of these characters and their code points: ``` B3 B4 BF C0 C1 C2 C3 C4 C5 D9 DA │ ┤ ┐ └ ┴ ┬ ├ ─ ┼ ┘ ┌ ``` You can use these characters to draw boxes like this: ``` ┌─────────┐ │ ...
[Question] [ Given a number and either "+" or "\*", return an addition or multiplication table with the dimensions of that number. ## Specifications * The input will be formatted as `dimension, operation`. * The program should not return anything if the operation input is not + or \*. * The program should not ret...
[Question] [ Write a program, that takes 5 numbers as input and outputs the next number in the pattern. Heres a text file with [1835 test patterns](https://drive.google.com/file/d/0B4vI8G7V69KsYk5sb2o5dUN0NEE/edit?usp=sharing), containing 6 numbers separated by commas each line. Using the first 5 numbers calculat...
[Question] [ Today our lesson is about rectangles and triangles. you will be given as an input an `n x n` grid that is based on two characters `#` and `*` you have to classify it into : triangle or rectangle. where `#` represents a point and `*` represents a blank space. # Example input: ``` #*** ##** ###* ##...
[Question] [ **Task** Inputs \$b \leq 100\$ and \$n \geq 2\$. Consider \$n\$ binary strings, each of length \$b\$ sampled uniformly and independently. We would like to compute the expected minimum [Hamming distance](https://en.wikipedia.org/wiki/Hamming_distance) between any pair. If \$n = 2\$ the answer is alway...
[Question] [ **This question already has answers here**: [Program that outputs a program that outputs a program ... that outputs "Hello!"](/questions/6544/program-that-outputs-a-program-that-outputs-a-program-that-outputs-hello) (13 answers) Closed 5 years ago. # Input A string `s` of printable ASCII chara...
[Question] [ **This question already has answers here**: [Catalan Numbers](/questions/66127/catalan-numbers) (57 answers) Closed 6 years ago. Write a function that calculates a row of the pascal triangle and returns the middle number, if there are 2 it should return their sum. Example: `5` would return `20...
[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/99949/edit). Closed 3 years ago. [Improve this question](/posts/99949/edit)...
[Question] [ 1. Your sourcecode **must not** contain any of the characters it outputs (case sensitive). 2. Your program **must not** output more than 500 characters/bytes. 1 byte = 1 char. Newline counts as 1 character. 3. Your program should **not** take any input. (from user, filename, network or anything). 4. ...
[Question] [ **This question already has answers here**: [Print/Output the L-phabet](/questions/87064/print-output-the-l-phabet) (128 answers) Closed 1 year ago. The community reviewed whether to reopen this question 1 year ago and left it closed: > > Original close reason(s) were not resolved > > > Fo...
[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/194304/edit). Closed 4 years ago. [Improve this question](/posts/194304/edi...
[Question] [ **This question already has answers here**: [pssssssssssssst](/questions/95318/pssssssssssssst) (7 answers) Closed 6 years ago. Given a positive integer N, output the innermost N×N square of an ASCII art spiral made of `-|/\` that spirals clockwise inward. The `-` is used for horizontal portio...
[Question] [ **This question already has answers here**: [We're no strangers to code golf, you know the rules, and so do I](/questions/6043/were-no-strangers-to-code-golf-you-know-the-rules-and-so-do-i) (73 answers) Closed 6 years ago. **To-Do: Come up with a Better Title** --- ### Specification: This chal...
[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/37992/edit). Closed 9 years ago. [Improve this question](...
[Question] [ Find the combination of N number of letters that make up the most words of length N. For example: ``` n r u -> run, urn dstu -> dust, stud (these are just examples, not the best combination of 3,4 length sets of letters) ``` The challenge in the case is to start with length N=3 and end at N=11. Whi...
[Question] [ Your code has to provide the following functions: ``` read(x) ``` > > Reads a complex number from the standard input. It has to accept and evaluate something in the form of for example `1.42 + 3i`. > > > ``` print(x) ``` > > Prints the complex number in the form of, for example `1.23 - 4.32i` > ...
[Question] [ [Project Euler Problem 387](http://projecteuler.net/problem=387) states: > > A *Harshad* or *Niven number* is a number that is divisible by the sum of its digits. > 201 is a Harshad number because it is divisible by 3 (the sum of its digits.) > When we truncate the last digit from 201, we get 20...
[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/197321/edit). Closed 4 years ago. [Improve this question](/posts/197321/edi...
[Question] [ ## This challenge is a harder version of [this one](https://codegolf.stackexchange.com/questions/71924/bijective-mapping-from-integers-to-a-variable-number-of-bits). A variable number of trits is an array of 0 or more trits (a trit is a [ternary](https://en.wikipedia.org/wiki/Ternary_numeral_system) ...
[Question] [ ## The challenge In the least number of source code characters, in a language of your choosing, devise a function which raises base *a* to power *b*, modulo *m*, using purely integer arithmetic, where *a*, *b*, and *m* are all unsigned 64-bit values or larger. You may use signed arithmetic if your la...
[Question] [ Your task is to format an address given in all lowercase to a friendlier format. Here's the catch, **no regexes**. Addresses will be given in the following format: `123 serpentine pl ne shoreline wa 98199` The expected output is the following: (notice the period and commas) `123 Serpentine Pl. NE, S...
[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 10 years ago. [Improve this qu...
[Question] [ Have a look at my (javascript) version of a O(log(n)) xn algorithm: ``` function pow(x,n) { return n==0?1:n==1?x:n==2?x*x:pow(pow(x,(n-n%2)/2),2)*(n%2==0?1:x); } ``` Can you get it shorter? [Answer] BrainFuck (482 characters) Solution is modulo 256. Reads n in digit by digit. Each time i...
[Question] [ The challenge is to create an iterator(/generator) which iterates (in any order so as to reach all of them... ie no set should occur at infinity) over all possible non-empty finite sets(/tuples/lists) of positive integers (hence demonstrating their countability). Since the problem of verifying the co...
[Question] [ well, I'm newly introduced to [befunge](http://en.wikipedia.org/wiki/Befunge). it seems to be an amazing language but a bit hard to start with! anyway after about 2 hours of hard work I've created a code which could read a line from stdin and write same line into stdout(I'm using line -1 as buffer in...
[Question] [ This is a code golf problem: Say you have two files, one file s and one file h. The problem is that for each line l of s you should produce a list that contains all lines of h that contain l. By "contain" I mean a substring, so, for example the line "foobar12baz" contains either foo, bar, foobar, 12,...
[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/238199/edit). Closed 2 years ago. [Improve this question](/posts/238199/edi...
[Question] [ This puzzle is based on [this Math.SE post](https://math.stackexchange.com/q/3261079/3392). A more complex version of this problem can be found [over here](https://codegolf.stackexchange.com/q/189531/73483). Assume I have some number of black shirts and some number of white shirts, both at least 1. B...
[Question] [ **This question already has answers here**: [Work out change [closed]](/questions/647/work-out-change) (6 answers) Closed 6 years ago. ## Overview In the US, the common denominations are the penny ($0.01), the nickel ($0.05), the dime ($0.10), the quarter ($0.25), one dollar, two dollars (less...
[Question] [ * Copy and paste or `curl` this text: <http://lorem-ipsum.me/api/text> * Using any language make the text palindromic. * You may remove letters. * You may rearrange letters. * The goal is to make the text palindromic by the **sequence of the letters and spaces**. The end result might not contain wor...
[Question] [ The class [`System.Globalization.EastAsianLunisolarCalendar`](http://msdn.microsoft.com/en-us/library/System.Globalization.EastAsianLunisolarCalendar.aspx) of the `mscorlib.dll` assembly is non-nested `public` but its sole instance constructor is `internal` and it also declares some `internal abstrac...
[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/255988/edit). Closed 1 year ago. [Improve this question](/posts/255988/edit...
[Question] [ This code golf challenge is to show directions through numbers. When the user enters a number, then that means a direction change as follows: ``` 0 means stay still 1 means forward (initially from left to right and initially start with `:`) 2 means turn right 3 means turn left 4 means go backward ```...
[Question] [ *Inspired (like 2 others) by [this](https://chat.stackexchange.com/transcript/message/38713104#38713104) chat message. (and to some extent, my [CMC](https://chat.stackexchange.com/transcript/message/38713335#38713335))* Given a string as an input, your task is to check whether or not that string is a...
[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/89324/edit). Closed 7 years ago. [Improve this question](/posts/89324/edit)...
[Question] [ **Winner** [CJam, 74 bytes](https://codegolf.stackexchange.com/a/38421/31300) by Optimizer **Task** * Take an input of an integer `n` through the console or a file. * Find the sum of the `n`th prime, square, triangular number, and cube. Add to that the factorial of the first decimal place of the squa...
[Question] [ I have a script: ``` $ cat ~/zebra.pl #!/bin/perl use Term::ANSIColor; $Term::ANSIColor::EACHLINE = "\n"; my $zebra = 1; # Are zebras black with white stripes, or white with black stripes?! my $black = color('white on_black'); my $blue = color('white on_blue'); while (<>){ chomp($_); $zebra =...
[Question] [ ## This page is not for [Visual Basic Tips](https://codegolf.stackexchange.com/q/155838/61846 "Visual Basic Tips") Visual Basic .NET (VB.NET) is an multi-paradigm dialect of [basic](/questions/tagged/basic "show questions tagged 'basic'") that was developed and released by Microsoft in 2002 as a repl...
[Question] [ **This question already has answers here**: [Case Permutation](/questions/80995/case-permutation) (24 answers) Closed 6 years ago. # Challenge For any string that is composed of alphabetical characters of any case, make a function that returns a list of all of it's variations, order and case-w...
[Question] [ This is a more difficult version of [It's a find-a-movie challenge](https://codegolf.stackexchange.com/questions/143772/its-a-find-a-movie-challenge) . **Input** Your code should take [a BBFC rating](http://uk.ign.com/wikis/content-ratings/BBFC) and a number from 1 to 5 as input. It can do this in an...
[Question] [ There are lots of challenges that just pick a sequence from oeis and ask you to print n-th number or first n numbers or whatever. It's time to ~~stop~~ automate! ## Task Your task is to parse a sequence page from [oeis.org](http://oeis.org/) and print its index, description and example values. The p...
[Question] [ *[Related](https://codegolf.stackexchange.com/questions/51402/each-step-of-the-levenshtein-distance)* Your goal, is to write a set of programs, that progresses from one to the other, one character at a time. For example. Given the starting program `abcd` and the ending program `wxyz`, you should have...
[Question] [ Dr. Trump is the head psychiatrist at a mental hospital, which is populated by murdering psychopaths. If 2 psychopaths are left together, they will end up brutally injuring or even killing each other, so Dr. Trump needs to build walls to separate these psychopaths, but owing to the limited amount of ...
[Question] [ **This question already has answers here**: [Ordering a list](/questions/85835/ordering-a-list) (29 answers) Closed 6 years ago. **Task** Basically you have an array of random integers e.g. ``` I() = [1, 4, 3, 2, 5, 3, 2, 1] ``` and you have to create another array of the same length with the ...
[Question] [ # Introduction It was just a normal day, here at your military base. Suddenly, you looked up to see a bomb falling down from the sky! You need to create a program to predict where it will fall, and tell you the location. # Challenge You will be given a bomb in the form of `Start-X Start-Y X-velocity ...
[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. [Improve this que...
[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/49718/edit). Closed 8 years ago. [Improve this question](/posts/49718/edit)...
[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. [Improve this que...
[Question] [ > > Noel Constant did it without genius and without spies. > > > His system was so idiotically simple that some people can't understand it, no > matter how often is is explained. The people who can't understand it are people > who have to believe, for their own peace of mind, that tremendous wea...
[Question] [ It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, [visit the help center](/help/reopen-questions). Closed...
[Question] [ **Description:** Write the fastest comparison function for an opaque field containing a double. Here is my example: ``` // Three-way comparison function: // if a < b: negative result // if a > b: positive result // else: zero result inline int Compare(const unsigned char* a, const unsigned char...
[Question] [ *This is the robbers thread of this cops and robbers challenge. The cops thread is [here](https://codegolf.stackexchange.com/questions/264161/hashers-and-crashers-cops)*. [Related, but hashes numbers instead of strings and uses a different scoring system.](https://codegolf.stackexchange.com/q/51068/1...
[Question] [ **This question already has answers here**: [Spell out the Revu'a](/questions/68901/spell-out-the-revua) (34 answers) Closed 7 years ago. Your program must take in a string like: ``` test string ``` And must output each character adding one at a time like this: ``` t te tes test test test s t...
[Question] [ *Note: This challenge has been changed to eliminate the strict whitespace manipulation requirements that made this challenge low-quality. Some rules regarding whitespace have been changed.* --- I'm rather good at mental math, particularly adding positive integers in my head. Here is my method for add...
[Question] [ This is the same question as [Solve the CodeSprint4 Leibniz code golf challenge in Python in 66 characters](https://codegolf.stackexchange.com/questions/10716/solve-the-codesprint4-leibniz-code-golf-challenge-in-python-in-66-characters). The variation is that I'm a C programmer. My code for the above...
[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/22087/edit). Closed 9 years ago. [Improve this question](/posts/22087/edit)...
[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/20053/edit). Closed 2 years ago. [Improve this question](/posts/20053/edit)...
[Question] [ **This question already has answers here**: [Need change of 78 cents [closed]](/questions/15872/need-change-of-78-cents) (5 answers) Closed 10 years ago. Challenge: given a number, calculate how many unique, order-independent ways there are to achieve a score of that number in American Footbal...
[Question] [ I tried this contest: <https://www.hackerrank.com/challenges/secret-language> Well, the score in this contest said I made 30 out of 30 points. As the score is calculated with the formula 30\*(1000-#chars)/1000 this is impossible. Here is my code: ``` import sys,string as s b='anbycoduepfxgqhvirjzkslw...
[Question] [ The same task as [Finding "sub-palindromes"](https://codegolf.stackexchange.com/questions/183/finding-sub-palindromes) but instead of finding substrings you must find **subsequences** that are **not substrings**. eg1: ``` input: "12131331" output: "11", "33", "111", "121", "131", "313", "333", "1111...
[Question] [ New Posts and New Sandbox Posts are chatbots that occupy CGSE's main chatroom, [The Nineteenth Byte](https://chat.stackexchange.com/rooms/240/the-nineteenth-byte). They've been doing their jobs for almost one full year now, so I thought I'd make a challenge to honor their contributions! The challenge...
[Question] [ # Challenge ## Premise It's 2006, and Alice is trying to send Bob ~~their~~ her completed notes on their newly ended expeditions into the labyrinthine school library, which the two of them found suffers from a bad case of non-Euclidean geometry.1 For some reason, Alice originally created her notes, w...
[Question] [ **Closed**. This question needs [details or clarity](/help/closed-questions). It is not currently accepting answers. --- **Want to improve this question?** Add details and clarify the problem by [editing this post](/posts/205597/edit). Closed 3 years ago. [Improve this question](/posts/205597/edi...
[Question] [ **This question already has answers here**: [Generate Monday Numbers](/questions/59014/generate-monday-numbers) (49 answers) [Is it a Lynch-Bell number?](/questions/129773/is-it-a-lynch-bell-number) (44 answers) Closed 5 years ago. A natural number (written in the decimal base) is qualified...
[Question] [ *Inspired by ["You had me at hello"](https://codegolf.stackexchange.com/questions/115207/you-had-me-at-hello)* # Introduction For those who don't know, hexadecimal is a base system like decimal. Contrary to decimal however, it uses 16 (hence the name) digits instead of 10. Here are the first few numb...
[Question] [ **This question already has answers here**: [Bracket Expansion!](/questions/154345/bracket-expansion) (18 answers) Closed 5 years ago. *Taken from [StackOverflow Question](https://stackoverflow.com/questions/50803170/decodestring-regex-solution/50803311)* **Challenge** Given an encoded string ...
[Question] [ **This question already has answers here**: [Test a number for narcissism](/questions/15244/test-a-number-for-narcissism) (77 answers) Closed 6 years ago. Given a natural numbers `n>1`, find the smallest narcissistic number of `n` digit. A [narcissistic number](https://en.wikipedia.org/wiki/Na...
[Question] [ The date 0409·01·MO is New Year’s Day in the Ceres Calendar. Wish everyone and everything in the [Asteroid Belt](https://dawn.jpl.nasa.gov/), [Jupiter](https://www.nasa.gov/mission_pages/juno/main/index.html), [Saturn](https://saturn.jpl.nasa.gov/) and [beyond](https://www.nasa.gov/mission_pages/newh...
[Question] [ This is a cops and robbers challenge - [Cop's Thread](https://codegolf.stackexchange.com/q/102056/48261) Each of the cops have been tasked to write a program that terminates after exactly 60 seconds, or as close as possible. For example: ``` #include <unistd.h> int main(int argc, char **argv){ sl...
[Question] [ Identify whether an IP address is internal, global, link-local, or reserved. Input should be an IPv4 address in decimal octets separated by periods. Output should be `0` for link-local (RFC 3927), `1` for internal (RFC 1918), `2` for global IPs (Internet), and `3` for otherwise reserved addresses. Al...
[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/87039/edit). Closed 7 years ago. [Improve this question](/posts/87039/edit)...
[Question] [ **This question already has answers here**: [Find the Nth pair of twin primes](/questions/31822/find-the-nth-pair-of-twin-primes) (27 answers) Closed 7 years ago. # Introduction We define **twin primes** as two natural numbers `p,p+2` which both are prime. ***Example***: `5` and `7` are twin ...
[Question] [ A shape's volume is the measure of how much three-dimensional space that shape occupies. # Challenge Given six integers: `[L,W,H]` as length, width and height of one container and `[l,w,h]` as length, width and height of some random item. You will need to calculate how many items would fit completely...
[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/74161/edit). Closed 7 years ago. [Improve this question](/posts/74161/edit)...
[Question] [ Output the provided table of English pronouns exactly, in as few bytes as possible. ### Code rules * The code will take no input * The table is tab-delimited * Each line begins with a single tab `\t` if there is no row heading * Each line ends in a single newline `\n` (not `\r\n`), including the last...
[Question] [ [The Sylvester-Gallai theorem](//en.wikipedia.org/wiki/Sylvester-Gallai_theorem) says: Suppose you have a finite list of points in the plane. Suppose further that not all of those points are collinear (lie in a single line). Then there is some line containing precisely two of the points. (That is, th...