text
stringlengths
180
608k
[Question] [ This is a follow up of [Print a maze](https://codegolf.stackexchange.com/q/245/32) question. If you like this question, please add more maze generation algorithms ;). For this task you'll have to implement a game engine for one player who must find the treasure in a maze and get out of the dungeon. T...
[Question] [ A few days ago I made a [puzzle](https://puzzling.stackexchange.com/questions/116014/moving-around-a-plane) about moving people on an airplane. Now I am interested in the general version of this puzzle and the shortest code golf for it. I will briefly summarise the puzzle here. A small airplane went ...
[Question] [ This expression actually has an omitted pair of parentheses. ``` 1 + 2 * 3 ``` To make things clear, it should be, ``` 1 + (2 * 3) ``` Even this has its parentheses missing. ``` 1 + 2 + 3 ``` It actually means, ``` (1 + 2) + 3 ``` People often assume left-to-right evaluation to such an arithmetic exp...
[Question] [ [Quell](https://fallentreegames.com/quell/) is a single-player grid-based puzzle game. Pearls are scattered across a 2D map and the aim is to collect them all by rolling a drop of water over them. For this challenge we will only consider basic maps containing the drop, pearls, walls, and empty spaces...
[Question] [ This is a two-player card game which resembles a vastly simplified game of [Texas Hold'em](https://en.wikipedia.org/wiki/Texas_hold_%27em), combined with RPS (rock-paper-scissors) and the most basic mechanic of commercial turn-based card games. ## The deck A single full deck consists of 30 unique car...
[Question] [ The [Najdorf Variation](https://en.wikipedia.org/wiki/Sicilian_Defence,_Najdorf_Variation) of the Sicilian Defence is an opening often played at the highest level of chess. It is named after GM Miguel Najdorf and is known for being extremely sharp and theory heavy. Your task is to write a program tha...
[Question] [ # Win a K vs KQ endgame ## Summary The goal of this challenge is to create a program or function which will win a Chess game with a King and Queen against a lone King. The user will specify three squares, representing the locations of the computer's King, the computer's Queen, and the user's King. Th...
[Question] [ Don't you hate it when you're trying to roughly sort a list based on user data, but you have to poll the user for thousands of comparisons? Hate no more, because the answers to this challenge are (going to be) here! ## Method The sorted-ness of a list is defined by how many possible comparisons it ha...
[Question] [ Write a program or function that takes **N**, and **S** and outputs the number of palindromes of length **S** you can build using an alphabet of size **N** such that any prefix of size between **2** and **S-1** is not a palindrome. For example if **N** were **2** and **S** were **5** The valid palind...
[Question] [ Input: An integer N which represents the polygon's vertices and a list of their x and y coordinates. Expected output: The smallest difference possible between the area of the(not necessarily convex) polygon and the triangle containing it. The triangle also has to share at least 2 vertices with the po...
[Question] [ # Inspired by [this challenge](https://codegolf.stackexchange.com/questions/140854/1326-starting-holdem-combos) and related to [this one](https://codegolf.stackexchange.com/questions/25056/compare-two-poker-hands). ### Background Badugi [bæduːɡiː] is a low-ball draw-poker variant. The Pokerstars Wor...
[Question] [ This year my age is a prime number, and so is this year. This conjunction will repeat in 10 years and again in 12. If I live to 100, I will lived exactly 11 years in which my age and the year are both prime. My condolences to those of you born in odd-numbered years, who will experience this phenomeno...
[Question] [ Long time ago, when I was spending more time playing RPG, one of the issues what some players had, was to track party movement and to draw proper map. So I come with idea, to check how you guys come deal with this issue. Task is to write a function, which takes as input parameter list of directions (...
[Question] [ This is Bub. Bub is a soccer player. However, he's not a very good one. He still can't kick the ball to the net! (If you haven't noticed, `@` is the ball. ``` _____ | \ O ...
[Question] [ This is similar to simplifying fractions, but with Dates! The input of your program must be of the form `mm/dd` For example ``` 3/4 //March 4 12/15 //December 15 1/1 // January 1 ``` We assume that the input will be valid such that the months have these numbers of days in them: ``` January 31 Februar...
[Question] [ There is [a great story to tell](http://www.radiolab.org/story/294349-what-it-about-bees-and-hexagons/) about regular hexagons found for example in honeycombs. But this busy bee needs your help in telling him which point is inside or outside his honeypot. So, given a regular hexagon as pictured below...
[Question] [ Suppose we define a simple program that takes an array L of natural numbers with some length N and does the following: ``` i=0 #start at the first element in the source array P=[] #make an empty array while L[i]!=0: #and while the value at the current position is n...
[Question] [ Given a list of the populations of each state, output, from greatest to least, the number of votes that state gets in the electoral college. **Input:** The first number represents the total number of votes to distribute; it is followed by a list of and populations. In this example, abbreviations for ...
[Question] [ Create a program that solves a mathematical expression using the elements from alternating sides of the expression. The way it’s done is, instead of reading from left to right, you read the first character, then the last, then the second, then the second to last etc. This will give you a new expressi...
[Question] [ # Background I want to build a fence. For that, I have collected a bunch of poles, and stuck them to the ground. I have also collected lots of boards that I'll nail to the poles to make the actual fence. I tend to get carried away when building stuff, and most likely I'll just keep nailing the boards...
[Question] [ Your task is to take an string containing an isotope of an element as input, encoded like the following example with the atomic number followed by a space and the IUPAC chemical symbol for the element: ``` 162 Dy ``` and return the number of *neutrons* in an atom of that isotope. In the above example...
[Question] [ If you want to build a fence and have different length boards available, there are many different ways to set up your posts. So, given a minimum and maximum board length, a number of boards, and the total length, count how many ways you can arrange them. **Input** Input is four positive integers: * *...
[Question] [ ## Task Write a program to determine the note sounded, along with how many cents out of tune, of a string tuned to a given frequency and pressed down at a given point. For the sake of simplicity, assume that the frequency of the sound produced and the length of the string to the right of where it is...
[Question] [ You should get string of chemical equation (no spaces, only letters (upper-case and lower-case), numbers, brackets and math signs) from user and print the answer if equation is **balanced** or not (any pair of positive/negative answers: Yes/No, true/false, 1/0). To make code shorter you can assume th...
[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 1 year ago. [Improve this ques...
[Question] [ Your task is to write a program, in any language, that adds two floating point numbers together WITHOUT using *any* fractional or floating point maths. Integer maths is allowed. **Format** The format for the numbers are strings containing 1's and 0's which represent the binary value of a [IEEE 754 32...
[Question] [ Your task is to convert Chinese numerals into Arabic numerals. A problem similar to [Convert Chinese numbers](https://codegolf.stackexchange.com/questions/97734/convert-chinese-numbers), however, more complex. Also, answers given there mostly don't satisfy all the conditions. Chinese digits/numbers a...
[Question] [ A [flow network](https://en.wikipedia.org/wiki/Flow_network) is a directed graph `G = (V, E)` with a source vertex `s ϵ V` and a sink vertex `t ϵ V`, and where every edge `(u, v) ϵ E` on the graph (connecting nodes `u ϵ V` and `v ϵ V`) has 2 quantities associated with it: 1. `c(u, v) >= 0`, the capac...
[Question] [ In this challenge, you will write an interpreter for **2Ω** (transcribed as **TwoMega**), a language based loosely on [brainfuck](https://esolangs.org/wiki/Brainfuck) with an infinite-dimensional storage space. ## The Language 2Ω contains three pieces of state: * The **Tape**, which is an infinite li...
[Question] [ The [coefficient of relationship](https://en.wikipedia.org/wiki/Coefficient_of_relationship#Human_relationships) refers to how much DNA two persons have in common. A parent has 50% common DNA with their child (unless the parents are related), so to calculate it we have to find all pairs of directed d...
[Question] [ ### Challenge Take a number and output it with 4 digits or less using letters and numbers. For example; `270,030` would turn into `270K`. ### Key Billion -> `B` Million -> `M` Thousand -> `K` ### Rules * You may choose to accept input numbers that include commas delimiting every three decimal places ...
[Question] [ Given a string representing a series of [aircraft marshalling hand signals](http://www.safetypostershop.com/wp-content/uploads/2012/07/aitrcraft-marshall-hand-signals.jpg), write a function or program to calculate the final position of an aircraft following these signals. ***N.B.:*** Co-ordinates in ...
[Question] [ ## Introduction In chemistry there is a type of extension, .xyz extension,(<https://en.wikipedia.org/wiki/XYZ_file_format>), that prints in each line a chemical element, and the coordinates in the plane of the element. This is very useful for chemists to understand chemical compounds and to visualize...
[Question] [ **Challenge:** Create a program that compresses a semi-random string, and another program that decompresses it. The question is indeed quite [similar to this one from 2012](https://codegolf.stackexchange.com/questions/4771/text-compression-and-decompression-nevermore), but the answers will most likel...
[Question] [ # Ascii Pong The challenge is to recreate the classic game "pong" in ASCII characters in the shortest code possible. **Requirements/specifications** * The "screen" should be 45x25 characters. * White space should actually be white space. * The paddles should be 9 equals signs: `=========` and should ...
[Question] [ [Marching Squares](https://en.wikipedia.org/wiki/Marching_squares) is an algorithm from computer graphics, which is used to recover 2D isocontours from a grid of samples (see also, its big brother [Marching Cubes](https://en.wikipedia.org/wiki/Marching_cubes) for 3D settings). The idea is to process ...
[Question] [ The [Sierpinski triangle](https://en.wikipedia.org/wiki/Sierpinski_triangle) is a set of points on the plane which is constructed by starting with a single triangle and repeatedly splitting all triangles into four congruent triangles and removing the centre triangle. The right Sierpinski triangle has...
[Question] [ This is an additional challenge to the [generate Loopy puzzles](https://codegolf.stackexchange.com/questions/36301/generate-loopy-puzzles) challenge. You might want to solve this challenge before attempting the harder challenge in the previous link. The goal of this challenge is to validate the solut...
[Question] [ I happened to glance at my watch today at exactly 11:11:11 (and today is 1/11; too bad it's not 2011), and that got me thinking: *I know! I should make a code golf question out of this! I'm a dork.* Anyway, your challenge is to take an hour, minute, and second as input, and output the next "interesti...
[Question] [ The [fifteen puzzle](https://codegolf.stackexchange.com/questions/6884/solve-the-15-puzzle-the-tile-sliding-puzzle) is peculiar in that only half the possible states of arrangement are solvable. If you flip the 14 and 15 tiles, there is no way you can slide the blocks so that they are flipped back. Y...
[Question] [ Implement a [verbal arithmetic](http://en.wikipedia.org/wiki/Verbal_arithmetic) solver of several same sequence of numbers added together: ``` TWO + TWO ----- FOUR REPEAT REPEAT REPEAT + REPEAT -------- ANDSTOP SPEED + SPEED ------- KILLS ``` There are some restrictions: each letter sho...
[Question] [ As with most APL symbols, `⍉` has different meanings when called with one argument (transpose) versus two arguments (dyadic transpose / reorder dimensions). This challenge concerns the latter, which acts similarly to `numpy.moveaxis` in Python or `permute` in MATLAB, but is more powerful. ## `order ⍉...
[Question] [ # Introduction This challenge is similar to [Project Euler](https://projecteuler.net/) problems. I came up with it because I was playing a deceivingly simple board game and couldn't come up with an efficient solution to answer a simple question about its mechanics. [Quarto](https://en.wikipedia.org/w...
[Question] [ This is a variant of [Play the word chain](https://codegolf.stackexchange.com/questions/68725/play-the-word-chain) and [Building a long chain of words](https://codegolf.stackexchange.com/questions/44922/building-a-long-chain-of-words) . --- The input is a non-empty list of unique words at least 2 cha...
[Question] [ Sandboxed and made less complicated and hopefully more fun. # Summary of the challenge Given a number of particles, either identical bosons or identical fermions, output the total wave function of the state assuming they are all independent. # Physics background Don't worry, you don't need to know qu...
[Question] [ The dice game [Mia](https://en.wikipedia.org/wiki/Mia_(game)) introduces a very non-trivial order of sets of size two: ``` {3,1} < {3,2} < {4,1} < {4,2} < {4,3} < {5,1} < {5,4} < {6,1} < {6,5} < {1,1} < {2,2} < {6,6} < {1,2} ``` In general, the order within a tuple does not matter `{x,y}={y,x}`, `{...
[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/106641/edit). Closed 7 years ago. [Improve this question](/posts/106641/edi...
[Question] [ This question is written because ["Thing Explainer"](https://xkcd.com/thing-explainer/) is fun to read, and gave me an idea. Write "stuff that makes computer do things" that reads/takes a set of letters, numbers and things like this `"#%|?` and returns `True / 1` if all words are part of [this set](h...
[Question] [ Convert a classical directory structure like this: ``` config.yml drafts begin-with-the-crazy-ideas.textile on-simplicity-in-technology.markdown includes footer.html header.html ``` Into this ``` . ├── config.yml ├── drafts | ├── begin-with-the-crazy-ideas.textile | └── on-simplic...
[Question] [ Write a function that takes two parameters: a positive integer *n* and a list of words. Given a cube of *n*-by-*n*-by-*n* units, assign a random letter (A-Z) to each surface unit. (For a 3x3x3 cube, there would be 9 surface units on each face.) Then determine whether it's possible for an ant walking ...
[Question] [ Usually when performing an internet challenge, there's no problem with having to specify a user agent, but when it comes to dealing with Google, it changes. Google blacklists the Urllib user agent, presumably to stop spambots, so you have to specify a user agent. This takes up many bytes, and is fra...
[Question] [ Knockout is a basketball game where players take turns shooting. It is played as a sequence of two-player contests, each of which has the possibility of "knocking out" one of those players. Suppose the players are `A B C D` and their chances of shooting and making a basket are `0.1 0.2 0.3 0.4` respe...
[Question] [ When you search for something on [Google](http://www.google.com), it conveniently gives a message near the top of the page saying something like `About 53,000,000 results (0.22 seconds)`. (The numbers change depending on what was searched of course.) In this challenge you will write a program that dr...
[Question] [ Take a following character table: ``` ------------------------------------------------------- | |1233456 | abc | xyz | | | |-------|--------|--------|--------|--------|---------| | |abcdefgh| 1234567| | 12345 | | | abc |xyzabcqw| | | ...
[Question] [ The challenge is to implement a 2-dimensional ray tracing program, text-based. Sources of white light are `@` symbols. `R`, `G` and `B` are light filters. `/` and `\` are mirrors with 80% reflectivity. `?` is a light sensor. `>`, `<`, `^` and `V` combine light in the appropriate direction (e.g. if on...
[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. **Locked**. This ...
[Question] [ I noticed that in Microsoft Word, single quotations are either `‘` or `’`, but not in Notepad. Your task today is: given a string `q`, convert all the `'` characters (only) to `‘` or `’`, according to these rules, and then output it: * If the character before the quote is a space, and after it comes ...
[Question] [ ## Shift Tac Toe Shift Tac Toe is a game that combines Tic Tac Toe and Connect 4 together. In this game, you start with a 3 by 3 board, and each row is connected to a slider that you can move left and right. At the start, the sliders all start to the very right(this means that you can't move the slid...
[Question] [ A [SMILES (Simplified molecular-input line-entry system) string](https://en.wikipedia.org/wiki/Simplified_molecular-input_line-entry_system) is a string that represents a chemical structure using ASCII characters. For example, water (\$H\_2O\$) can be written in SMILES as `H-O-H`. However, for simpl...
[Question] [ So I was playing around with [this emulator of the Intel 4004](http://e4004.szyc.org/emu/) and decided I wanted to set a challenge for myself. The first use for the 4004 was in a calculator, so I decided that I would try to code golf every operator on said calculator(addition, subtraction, multiplica...
[Question] [ # Thanks, Uncle (the story) My slightly mad uncle recently left for the space colonies, and passed his pallet goods business to me. The rectangular warehouse is full of pallets of goods except for the one square by the door, and I've just received the first list of pallets ordered by customers to be ...
[Question] [ [Peg solitaire](https://en.wikipedia.org/wiki/Peg_solitaire) is a popular game usually played alone. The game consists of some number of pegs and a board which is divided into a grid - usually the board is not rectangular but for this challenge we will assume so. Each valid move allows one to remove ...
[Question] [ This is based on how my company deals with the monitoring of the working times for every employee. Each one of us has a card that can be passed in front of a sensor, so that a clock registers the times at which the employees check in or out the office. Every time register is linked to a code: * Code ...
[Question] [ ``` '---------' '-'.repeat(9) // longer! '------------' (x='----')+x+x '-'.repeat(12) // same length ``` Is there any cleverer way of generating strings of 12 repeated characters in JavaScript? [Answer] Unfortunately, after what seems an eternity of searching documentation, I can't seem find a...
[Question] [ You're looking at an avenue, and someone has left the trash out! You need to write a program to help fix the problem, by putting the trash into trashcans. # The task The avenue is made up of a string of printable ASCII characters, e.g.: ``` [[](dust)[]] car ((paper)vomit) (broken(glass)) [[] (rotten)...
[Question] [ ## Introduction A [radix tree](https://en.wikipedia.org/wiki/Radix_tree), also known as compressed trie or compressed prefix tree, is a tree-like data structure for storing a set of strings. The edges of the tree are labeled by nonempty strings, and each node is either terminal or nonterminal. The st...
[Question] [ [IPv4 addresses](https://en.wikipedia.org/wiki/IP_address) are 32 bits wide, and thus the size of the address space is 232, or 4,294,967,296. However, this is only a theoretical upper-bound. It is not an accurate representation of all the addresses that may actually be used on the public internet. Fo...
[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/69642/edit). Closed 8 years ago. [Improve this question](...
[Question] [ Some friends and I have played some DSA (a mainly german tabletop RPG much like D&D). I was wondering what the chance on passing rolls are, so you will have to write some code to calculate it. Your character is defined by stats (from 8 to 14) and (TV) Talent values (0 to 21). For now we will use clim...
[Question] [ As someone who can't be bothered to look at their pentominos to see if it makes a rectangular shape, I've decided to make you write a program that does it. # Your task Given some input split by newlines containing 12 unique characters, decide if it is a valid solution. A valid solution MUST * Have 5 ...
[Question] [ # Introduction The challenge is a very interesting variant of the [game racetrack](https://en.wikipedia.org/wiki/Racetrack_(game)) and those two challenges: * [To Vectory! – The Vector Racing Grand Prix](https://codegolf.stackexchange.com/questions/32622/to-vectory-the-vector-racing-grand-prix) * [Pr...
[Question] [ # Task Your task is to write whole program, which will align given input to a block of given size. *Input:* ``` 40 Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco lab...
[Question] [ Computers live by binary. All programmers know binary. But the `2**x` bases are often neglected as non-practical, while they have beautiful relations to binary. To show you one example of such a beatiful relation, 19 will be my testimonial. ``` 19 10011 103 23 13 j ``` * 19 is decimal, included for c...
[Question] [ I'm a lazy but efficient person, as many of you probably are as well. So, whenever I'm doing something I want to do it with minimal effort. Which is why I'm asking you to solve this problem for me. What I have here is a document of sorts. On every line of this document is a single word or short phras...
[Question] [ This is my first experiment with an asymptotic complexity challenge although I am happy with answers entirely in code as long as they come with an explanation of their time complexity. I have the following problem. Consider tasks T\_1, ... T\_n and procs M\_1, ... , M\_m. Each task takes a certain am...
[Question] [ In the Futurama episode [The Prisoner of Benda](http://en.wikipedia.org/wiki/The_Prisoner_of_Benda) members of the crew swap bodies with each other, with the catch that no pair of *bodies* can have their minds swapped more than once. ### Challenge Write a program or function that accepts a valid coll...
[Question] [ It is possible to compress some kinds of data, such as human text or source code, with straight-line grammars. You basically create a grammar whose language has exactly one word – the uncompressed data. In this task, you have to write a program that implements this method of data compession. ## Input...
[Question] [ [BLC (Binary Lambda Calculus)](https://tromp.github.io/cl/Binary_lambda_calculus.html) is a binary encoding of untyped [lambda calculus](https://en.wikipedia.org/wiki/Lambda_calculus) which was created to “provide a very simple and elegant concrete definition of descriptional complexity.” What are so...
[Question] [ ### The Monkey has swung home to find his tree all in pieces. He likes order and scoops up all his 'tree-parts' and sets them out in `3` groups. The Monkey's `3` nested lists: ``` STEP = [['S', '1', 'B', '3'], ['S', '3', 'B', '11'], ['S', '5', 'B', '12'], ['S', '4', 'B', '13'], ['S', '2', 'B', '14']]...
[Question] [ In golf, a knowledgable caddie helps an already good golfer to be even better. In this challenge, you build a "caddie" to help you code golf. In particular, your caddie will compress golfed code in such a way that another program can uncompress and then run the code. A good caddie will compress golfe...
[Question] [ Write a program or function that takes input: all resistors available and a resistance value and outputs a truthy value of whether or not it is possible to get the resistance by using those resistors. **Rules:** Any format for input will do. There will be at least 1 available resistor and your progra...
[Question] [ Given a set of items, each with a weight and a value, determine the number of each item to include in a collection so that the total weight is less than or equal to a given limit and the total value is as large as possible. [Wikipedia for more information](https://en.wikipedia.org/wiki/Knapsack_probl...
[Question] [ # Introduction Ever heard of [Remind?](https://www.remind.com/) No? Neither did I until about 2 years ago. Basic premise of it is for teachers to send out reminders and communicate with their students. Pretty neat, right? It even allows you send emotes and react to messages! Which I do on a daily bas...
[Question] [ > > (Note: although related, this challenge is not a duplicate of [this one](https://codegolf.stackexchange.com/questions/52452/leap-for-leap-seconds) because it requires determining leap seconds automatically rather than hardcoding their times, and is not a duplicate of [this one](https://codegolf....
[Question] [ A [prime knot](https://en.wikipedia.org/wiki/Prime_knot) is: > > a non-trivial knot which cannot be written as the knot sum of two non-trivial knots. > > > Explanation of a [knot-sum](https://en.wikipedia.org/wiki/Connected_sum#Connected_sum_of_knots): put the two knots adjacent, [![enter image d...
[Question] [ # Background This question is similar to [this one](https://codegolf.stackexchange.com/questions/55823/its-super-effective). I have provided all of the information needed below. If you are familiar with the other challenge then note that we are ranking all defenses instead of seeing the effectiveness...
[Question] [ ## Crash Course on DST [Dempster–Shafer theory (DST)](https://en.wikipedia.org/wiki/Dempster%E2%80%93Shafer_theory) provides a method to combine various sources of evidence to form a belief. Given a list of possible statement (one of which is the true answer), each possible *combination* of statement...
[Question] [ Being programmers, watching us flex aren't very interesting. Today we change that! In this challenge you will lex and flex hexaflexagons. # About For a video introduction, watch [viharts video(s) on flexagons](https://youtu.be/VIVIegSt81k) A flexagon is a shape that you can flex to reveal faces other...
[Question] [ ## The Challenge Given either a string (may have newlines), or a two dimensional array, and a positive integer `n`, output the position of the platforms `n` turns after the initial position. --- `U, D, R, L` are platforms. `^, v, >, <` are arrows that change the directions of the platforms. `U, D, R...
[Question] [ In trigonometry, there are certain angles known as "special angles". This is because when you take sin, cos or tan of one of these angles, you get a result that is easy to remember because it is a square root of a rational number. These special angles are always multiples of either `pi/6`, or `pi/4`....
[Question] [ INTERCAL is a wonderful language, but it is not always easy to understand other people's code. This is particularly the case if they use the COME FROM statement. ![INTERCAL IS MADNESS](https://i.stack.imgur.com/9m09R.png) # Challenge definition 1. Write a **program** or **function** which take the so...
[Question] [ Given a set of formulas like this: ``` bacb bcab cbba abbc ``` Give an algorithm that finds the number of unique results you can get when each variable is substituted for either "0" or "1" in every formula. There are `(k!)^2` formulas, each with `2k-1` variables and `k^2` terms. Express your asymptot...
[Question] [ You decided to organize a [rock-paper-scissors](http://en.wikipedia.org/wiki/Rock-paper-scissors) championship to find out who is the best. You don't want to let luck to decide the winner so everyone has to give you his or her tactic in writing before the competition. You also like simple things so a...
[Question] [ Imagine some cube which we can cut into smaller cubes without remaining pieces. Find to how many cubes a cube can be cut. For example, a cube can be cut into 8, 27 (obviously 3rd powers of integers) and 20 (19 small cubes plus one eight times the size of the others, see image). See here some help: ...
[Question] [ Given A and B, where A is the scale of a Digital LED Pattern B. Parse pattern B and print the number. input: ``` 1 _ _ _ _ _ _ _ _ _ _ _ _ _| _| _|| ||_||_ ||_ |_|| | ||_||_||_ ||_| |_ _||_ |_| | _| ||_| ||_| | | | _| ||_| ``` output: ``` 2320451640799518 ``` in...
[Question] [ You are Tom Sawyer and you have to paint a fence of 102400 m long. Luckily, your friends decided to help you in exchange of various things. Each friend will paint **L** meters, starting from **S** with color **C**. **S**, **L** are integer amount of meters and 1 ≤ **C** ≤ 97. Getting bored you decide...
[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/224879/edit). Closed 2 years ago. [Improve this question](/posts/224879/edi...
[Question] [ Given a BF program consisting of only the characters `+-[]<>.,` with the property that there's an equal number of `<` and `>` between every matching pair of `[]`. You have to find the shortest program that can be achieved with the optimal memory layout (by rearranging the cells on the tape). If there...
[Question] [ A set of dominoes consists of tiles with two numbers on them such that every combination of integers from 0 to N are represented. Examples below refer to N=6 out of convenience, but N=9 and N=12 are also common. The orientation of the tiles does not matter (they are usually printed with dots rather t...
[Question] [ *(Inspired quite heavily by [this challenge](https://codegolf.stackexchange.com/questions/137066/zippered-paragraph))* In the original challenge you were to make a horizontal zipper, however, looking down at my hoodie, my zipper is much more vertical (and a little bit broken) :P **Input** You will b...