text
stringlengths
180
608k
[Question] [ Given an ASCII representation of a piece of string, determine its length. # Input An multi-line ASCII rendering of a piece of string, which runs from top to bottom, with one 'node' (corner) on each line of input. The delimiter may be assumed to be `CR`, `LF`, `CRLF`, or `LFCR`. Input may be accepted ...
[Question] [ **This question already has answers here**: [Fibonacci function or sequence](/questions/85/fibonacci-function-or-sequence) (334 answers) Closed 7 years ago. **Background of Lucas Numbers** The French mathematician, Edouard Lucas (1842-1891), who gave the name to the Fibonacci Numbers, found a ...
[Question] [ **This question already has answers here**: [String.prototype.isRepeated](/questions/37851/string-prototype-isrepeated) (20 answers) Closed 7 years ago. > > A string is called a "prime string" if it can't be written as a concatenation of more than one of the same string. > > > Your task is...
[Question] [ **Input:** A grid of varying size only containing numbers in the range `00-99`, the following four characters: `^`; `>`; `v`; `<`, and spaces to fill (and new-lines of course). **Output:** The result of the sum (integer) when you follow the path. **How does this work?** You start at the arrow with t...
[Question] [ **This question already has answers here**: [Determine whether strings are anagrams](/questions/1294/determine-whether-strings-are-anagrams) (162 answers) Closed 7 years ago. # Inspired by [Input ∩ Source Code](https://codegolf.stackexchange.com/q/89400/48934). --- # Task * Your task is to det...
[Question] [ Write some code that takes a single string as input and outputs MSB-set aligned ASCII. Only ASCII characters less than 128 (0x80) will be in the input. The output format is generated as follows: * For each character convert it to its binary representation, remove the MSB (always `0` in the input) and...
[Question] [ The city of Poughkeepsie celebrates Halloween every year. Geographically, the city is a rectangle that is 30 miles long and 45 miles wide. On a map, it looks like a grid, with its east-west roads horizontally dividing the city into 1-mile-long rectangles and its north-south roads vertically dividing ...
[Question] [ **This question already has answers here**: [Tell me how many math problems I have to do!](/questions/51189/tell-me-how-many-math-problems-i-have-to-do) (11 answers) Closed 8 years ago. # The Challenge I always write my math assignments down in the same way. For example: ``` pg. 420: #25, 50-5...
[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/50276/edit). Closed 6 years ago. [Improve this question](/posts/50276/edit)...
[Question] [ I'd like to get a list of words that are strongly connected with a particular time epoch, for example, 19th century, 20th century and 21st century. I suspect that nobody used a word like "smartphone" in 19th and 20th century, and, vice versa, nobody still uses a word like "grubble" anymore in 21th ce...
[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 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/21892/edit). Closed 9 years ago. [Improve this question](...
[Question] [ Given the scheme of the fleet of the human player, let the user choose which coordinates attack each turn. The "computer player" will then attack on its turn following the classic rules of battleship. (The computer player must be able to win, you can't make the computer attack every turn the same c...
[Question] [ **Task:** Find the count of numbers between `A` and `B` (inclusive) that have sum of digits equal to `S`. Also print the smallest such number between `A` and `B` (inclusive). **Input:** Single line consisting of `A`, `B`, and `S`. **Output:** Two lines. In first line, the number of integers bet...
[Question] [ The clustering coefficient of a graph (or network) is a: > > measure of degree to which nodes in a graph tend to cluster together > > > [The Wikipedia article](http://en.wikipedia.org/wiki/Clustering_coefficient#Network_average_clustering_coefficient) gives a much better description of how networ...
[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/4483/edit). Closed 2 years ago. [Improve this question](/posts/4483/edit) ...
[Question] [ Your function must have an input that takes in an array containing 10000 random names, and must sort these names in alphabetical order. Names have a random length of up to 128 characters. ISO/IEC 8859-1 character set assumed to be used for the list of names. Usable list of names can be found at <http...
[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 12 months ago. [Improve this q...
[Question] [ **Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers. --- This question does not appear to be about code golf or coding challenges within the scope defined in the [help center](https://codegolf.stackexchange.com/help/on-topic). Closed last year....
[Question] [ Does anyone have tips on how to golf in this language? Please one tip per answer and avoid posting simple and general tips such as "remove whitespace". [Here](https://github.com/ZippyMagician/Arn) is the github link and [here](https://esolangs.org/wiki/Arn) is the esolang page. ]
[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/249573/edit). Closed 1 year ago. [Improve this question](/posts/249573/edit...
[Question] [ In Windows, when you perform double-click in a text, the word around your cursor in the text will be selected. (This feature has more complicated properties, but they will not be required to be implemented for this challenge.) For example, let `|` be your cursor in `abc de|f ghi`. Then, when you doub...
[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/243707/edit). Closed 1 year ago. [Improve this question](/posts/243707/edit...
[Question] [ [Cops thread (read first)](https://codegolf.stackexchange.com/questions/243503/hello-shue-cops) Robbers, your task is to find a [Shue](https://codegolf.stackexchange.com/questions/242897/golf-the-prime-numbers-in-shue) program `p` that when given the cops input `i`, outputs a program `h`, which outpu...
[Question] [ **This question already has answers here**: [Shortest code to produce non-deterministic output](/questions/101638/shortest-code-to-produce-non-deterministic-output) (131 answers) [Shortest code to produce infinite output](/questions/13152/shortest-code-to-produce-infinite-output) (333 answers...
[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/210639/edit). Closed 3 years ago. [Improve this question](/posts/210639/edi...
[Question] [ **Closed.** This question is [off-topic](/help/closed-questions). It is not currently accepting answers. --- This site is for programming contests and challenges. **General programming questions** are off-topic here. You may be able to get help on [Stack Overflow](http://stackoverflow.com/about)...
[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/205650/edit). Closed 3 years ago. [Improve this question](/posts/205650/edi...
[Question] [ **This question already has answers here**: [Is a number divisible by each of its digits?](/questions/41902/is-a-number-divisible-by-each-of-its-digits) (71 answers) Closed 3 years ago. # Task Write a function or program that takes `n` as a parameter and prints the first `n` self-divisors. # D...
[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/203879/edit). Closed 3 years ago. [Improve this question](/posts/203879/edi...
[Question] [ ### Introduction: Two resistors, `R1` and `R2`, in parallel (denoted `R1 || R2`) have a combined resistance `Rp` given as: $$R\_{P\_2} = \frac{R\_1\cdot R\_2}{R\_1+R\_2}$$ or as suggested in comments: $$R\_{P\_2} = \frac{1}{\frac{1}{R\_1} + \frac{1}{R\_2}}$$ Three resistors, `R1`, `R2` and `R3` in pa...
[Question] [ **Input:** You will be passed a string containing a single english word. All letters will be lowercase, and there will be no non-alphabetic characters in the string. **Output:** You will return an integer from 1 to 7 representing how many syllables you think are in the word. **Scoring:** Your program...
[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/189281/edit). Closed 4 years ago. [Improve this question](/posts/189281/edi...
[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/188566/edit). Closed 4 years ago. [Improve this question]...
[Question] [ In this challenge you will write a program that takes two newline-separated strings, s1 (the first line) and s2 (the second line), as input (STDIN or closest). You can assume that the length of s1 will always be smaller than 30 and bigger than the length of s2. The program should then output each ste...
[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/186527/edit). Closed 4 years ago. [Improve this question](/posts/186527/edi...
[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/179677/edit). Closed 5 years ago. [Improve this question](/posts/179677/edi...
[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/175190/edit). Closed 5 years ago. [Improve this question](/posts/175190/edi...
[Question] [ Write a program that outputs the lyrics to 99 Bottles of Beer, **in as few bytes as possible**. Lyrics: ``` 99 bottles of beer on the wall, 99 bottles of beer. Take one down and pass it around, 98 bottles of beer on the wall. 98 bottles of beer on the wall, 98 bottles of beer. Take one down and pass ...
[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/171478/edit). Closed 5 years ago. [Improve this question](/posts/171478/edi...
[Question] [ So task is simple, given array of numbers and result, you need to find what operations you need to use on numbers from array , to obtain requested result. Let's make it simple for start, and allow only basic operations such as: addition, subtraction, multiplication and division. Example: ``` Input ...
[Question] [ [Related, both rope, nail and falling, but reversed and some other differences](https://codegolf.stackexchange.com/questions/106745/no-strings-attached) Consider a loop of rope hanging on `n` nails on a row. Given a table showing whether the rope would fall down when each possible set of nails were r...
[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/139824/edit). Closed 3 years ago. [Improve this question](/posts/139824/edi...
[Question] [ **This question already has answers here**: [Compute the multinomial coefficient](/questions/69424/compute-the-multinomial-coefficient) (17 answers) Closed 5 years ago. Given a list of stack heights, calculate the number of ways those heights could have been arrived at by stacking blocks one 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/152109/edit). Closed 6 years ago. [Improve this question](/posts/152109/edi...
[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 6 years ago. [Improve this que...
[Question] [ Based on the interpretation user [@ThePirateBay](https://codegolf.stackexchange.com/users/72349/thepiratebay) made from the **[first version](https://codegolf.stackexchange.com/revisions/140321/1)** of my own challenge ### [Output diagonal positions of me squared](https://codegolf.stackexchange.com/q...
[Question] [ **This question already has answers here**: [Connect the pixels](/questions/93824/connect-the-pixels) (13 answers) Closed 6 years ago. *Inspired by [Braille graphics](https://codegolf.stackexchange.com/q/140624/42963)* Given a Boolean matrix (i.e., consisting of only `1`s and `0`s), output an ...
[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 6 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/114407/edit). Closed 6 years ago. [Improve this question](/posts/114407/edi...
[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/113007/edit). Closed 6 years ago. [Improve this question](/posts/113007/edi...
[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/109994/edit). Closed 7 years ago. [Improve this question](/posts/109994/edi...
[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 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/102195/edit). Closed 7 years ago. [Improve this question](/posts/102195/edi...
[Question] [ Write the shortest possible program that draws a Bresenham line in ASCII art. Your program should take two integers `x` and `y` (command line or stdin, your choice) and draw an ASCII line which starts in the upper left and goes right `x` units and down `y` units. You must use `_` and `\` characters a...
[Question] [ [SageMath](http://www.sagemath.org/) is an open-source mathematics software system, built on Python 2. Its extensive math library support makes it a strong choice for golfing in math-based challenges. What tips do you have for golfing in SageMath? One tip per answer, please. Tips should be specifical...
[Question] [ # Background The official currency of the imaginary nation of Golfenistan is the *foo*, and there are only three kinds of coins in circulation: 3 foos, 7 foos and 8 foos. One can see that it's not possible to pay certain amounts, like 4 foos, using these coins. Nevertheless, all large enough amounts ...
[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/84360/edit). Closed 7 years ago. [Improve this question](/posts/84360/edit)...
[Question] [ Your goal is to determine whether a given 2D point X lies within the area of the triangle with given vertices A,B,C. Write a function that takes in the coordinates of the test point X and the three triangle vertices (so that's 8 coordinates total) and returns True if the point lies inside that triang...
[Question] [ Your challenge is extremely simple. Given a year as input, print all the months in that year that will contain a [Friday the 13th](https://en.wikipedia.org/wiki/Friday_the_13th) according to the Gregorian calendar. Note that even though the Gregorian Calendar wasn't introduced until 1582, for simplic...
[Question] [ You are given an encrypted string, encrypted using a very simple substitution cipher. **Problem** You do not know what the cipher is but you do know the ciphertext is English and that the most frequent letters in English are *etaoinshrdlucmfwypvbgkqjxz* in that order. The only allowed characters are...
[Question] [ # Your Challenge: For a golf Course Of Inputted 'n' length to hole where: ``` 'n' is a whole number and a multiple of 5 between 150 and 500 and 1 integer in code = 1 metre ``` You must calculate the least amount of swings it can be completed in using a combination of clubs and ranges. Here is a vis...
[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/65885/edit). Closed 8 years ago. [Improve this question](/posts/65885/edit)...
[Question] [ ## Explanation The **edit distance** between two strings is a function of the minimum possible number of insertions, deletions, or substitutions to convert one word into another word. Insertions and deletions cost 1, and substitutions cost 2. For example, the distance between `AB` and `A` is 1, becau...
[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/64237/edit). Closed 8 years ago. [Improve this question](...
[Question] [ [Hamming numbers](http://en.wikipedia.org/wiki/Hamming_numbers) are numbers which evenly divide a power of 60. Equivalently, their prime factors are all \$ \le 5 \$. Given a positive integer, print that many Hamming numbers, in order. Rules: * Input will be a positive integer \$n \le 1,000,000 \$ * O...
[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/61516/edit). Closed 6 years ago. [Improve this question](/posts/61516/edit)...
[Question] [ This is the followup question to [this previous CodeGolf](https://codegolf.stackexchange.com/questions/51977/covering-array-validator) question about Covering Arrays (the details of what Covering Arrays are and how they are formatted at the NIST website are there). In this challenge, we won't just be...
[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/53209/edit). Closed 6 years ago. [Improve this question](/posts/53209/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/50761/edit). Closed 8 years ago. [Improve this question](/posts/50761/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/38030/edit). Closed 9 years ago. [Improve this question](...
[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/32389/edit). Closed 9 years ago. [Improve this question](...
[Question] [ I'm not to sure about the title so feel free to suggest a better one. ## Task/challenge Create an overview for the World Cup tracking the cup from the group phase till the finals. ## Group phase There are 8 groups (Group A, B, C, .., H) which can be found [>> here <<](http://www.fifa.com/worldcup/gr...
[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/25257/edit). Closed 9 years ago. [Improve this question](/posts/25257/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 10 years ago. [Improve this qu...
[Question] [ This challenge is about finding the perfect match between your program sourcecode and the output from your program. Scoring table for the **output**: ``` Each letters (a-z|A-Z) : `a` or `A` 1 points `b` or `B` 2 points ... `z` or `Z` 26 points ``` ...
[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] [ **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/15416/edit). Closed 10 years ago. [Improve this question](/posts/15416/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/10950/edit). Closed 9 years ago. [Improve this question](/posts/10950/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/6944/edit). Closed 7 years ago. [Improve this question](/posts/6944/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 9 years ago. [Improve this que...
[Question] [ As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reop...
[Question] [ **This question already has answers here**: ["Hello, World!"](/questions/55422/hello-world) (974 answers) Closed 8 years ago. # Introduction Everyone's first program outputs `Hello World!`. This program should be very simple, that's all you have to do. # Challenge Output the string `Hello Worl...
[Question] [ # Like the previous SmokeDetector [challenge](https://codegolf.stackexchange.com/q/214077/68942)? This one is for you too ;) > > ***Note**: [SmokeDetector](https://github.com/Charcoal-SE/SmokeDetector/blob/master/README.md) is a bot that detects spam and offensive posts on the network and posts aler...
[Question] [ Create the shortest program that given an input string it outputs the opposite-cased string. For example if I pass the string `"HeLlO"` the program should output `"hElLo"`. Of course, neither aggregate functions can be used, nor framework functions like `toupper()` or `tolower()`. Any language is wel...
[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/12673/edit). Closed 5 years ago. [Improve this question](/posts/12673/edit)...
[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] [ # Guidelines ### Task Write a function that takes in a sentence (a string, or list of characters) and reverses all the words that are greater than or equal to 5 in length. --- ### Examples `"Hey fellow code golfers" -> "Hey wollef code sreflog"` `"I aM noT a cAr" -> "I aM noT a cAr"` `"I Am a tRaiN" ...
[Question] [ Your program must print out this exact sequence: ``` 1 2 4 10 24 54 116 242 496 1006 2028 4074 8168 16358 32740 65506 131040 262110 NOPE! ``` As usual, shortest program wins. Standard code golf rules apply. [Answer] # [Python 2](https://docs.python.org/2/), 51 bytes ``` i=0;exec"print 2**i-i<<...
[Question] [ This challenge is very simple: Given an angle measure in degrees or radians (your choice), output the angle between 0 and 2π non-inclusive [0º, 360º) that is [coterminal](http://www.softschools.com/math/trigonometry/coterminal_angles/) with it. ## Input A positive or negative angle measure. You can ...
[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/215719/edit). Closed 3 years ago. [Improve this question](/posts/215719/edi...
[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/74557/edit). Closed 7 years ago. [Improve this question](/posts/74557/edit)...
[Question] [ **This question already has answers here**: [1/N probability](/questions/66922/1-n-probability) (49 answers) Closed 6 years ago. > > ***Note**: There was not a vanilla challenge to actually flip a coin, even though there were mentions about flipping coins a lot of places. Even though there is...
[Question] [ Given the following list of numbers, find the group of sequential positive numbers with the highest sum. Example input: ``` 12 2 35 -1 20 9 76 5 4 -3 4 -5 19 80 32 -1 ``` Example output: ``` 131 ``` The most succinct code wins. My approach via Perl is 87 chars (with input as command-line args): ``` p...
[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/2370/edit). Closed 9 years ago. [Improve this question](/posts/2370/edit) ...
[Question] [ I, uh....honestly can't believe we don't have this one yet. # Challenge Write two functions or programs that: 1. Convert from decimal to percentage 2. Convert from percentage to decimal You may also write a single program that does both of the above. # Format Percentages *must* be taken and returned ...
[Question] [ The goal is to write a program that returns number of 1 bits in a given number. ## Examples ``` 5 -> 2 1254 -> 6 56465 -> 8 ``` ## Winner The winning submission is the code which runs in the minimum time. You can assume that normal int value in your language can handle any number (no matte...
[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/28728/edit). Closed 7 years ago. [Improve this question](...
[Question] [ Write the shortest possible program which takes a numeric input and outputs the result of adding 42 to the input. ``` f(x) -> x + 42 ``` There's only one restriction. Your program can only be composed of rod logic characters... --- The definition for a rod logic character is a one that is composed pu...