instruction_seed
stringlengths
34
53.1k
_source
stringclasses
1 value
In the original Shantae game, there are transformation dances that you have to input in time using the D-Pad, A, and B. If you complete a predefined sequence while dancing, you will transform into the corresponding form (or teleport or heal). Your task is to output the corresponding effect when given an input. The catc...
stackexchange_codegolf
Traveling with electronics is always fun, especially when you need an adapter to charge them. Your challenge is to make planning a trip a little easier by checking if a given plug will be compatible with a given socket. Challenge Given a plug type and a socket type, return a value that indicates whether they will work ...
stackexchange_codegolf
Make a function that increments a number using only bitwise, loops, and conditions. Rules: All entries must be as per the language spec defined below. Scoring is not of code length, but of the points for each operation given below. The entry point is inc(a), for "increment and return a". Lowest score wins. See the e...
stackexchange_codegolf
Your task is to write a program which given an array and a number, you need to split the array into chunks with size is number. Rules Your program will receive an array A , as well as a positive integer n. The array should then be split into chunks of length n, if the length of the string isn't divisible by n any left...
stackexchange_codegolf
Wikipedia has several restrictions on an article's title. I summarize them here: It may not be empty. It may not begin with a lowercase letter. A character is considered lowercase if it has an Ll after its name in UnicodeData.txt. It may not contain any of the characters: # < > [ ] | { } _ It may not be . or .. It may...
stackexchange_codegolf
You are given a certain number of cups (n). You are tasked with stacking these cups into a pyramid, with each row having one more cup than the row above it. The number you are given may or may not be able to be perfectly stacked. You must write a function that takes the total number of cups (n), and returns the followi...
stackexchange_codegolf
Write a function to produce, for a non-negative integer, a string containing a sum of terms according to the following: 3 -> "3" 805 -> "800 + 5" 700390 -> "700000 + 300 + 90" 0 -> "0" 13 -> "10 + 3" 200 -> "200" Any input other than a non-negative integer can be ignored. Zero terms must be skipped unless the inp...
stackexchange_codegolf
For your hard thing to do, you must make a thing for a computer to do that finds out if some words are explained in a simple way. Something is explained in a simple way if it only uses the ten hundred most used words. If not, it is explained in a hard way. This can be a full computer thing or part of a computer thing. ...
stackexchange_codegolf
In this challenge, the goal is to create a pristine truth machine in as few bytes as possible. For reference, a truth machine does the following: Takes input, which is always 0 or 1 If the input is 0, it is printed and the program terminates If the input is 1, it is printed forever A pristine program is one that does...
stackexchange_codegolf
ello all, I hope this finds you well. There are 118 elements on the Periodic table at the moment, each one corresponds to the number of protons in an atom's nuclei. Each element also has a 'symbol'. Hydrogen has 'H', Helium has 'He' and so on. I want to know about these! Challenge: Given 1 string as input, output true ...
stackexchange_codegolf
Challenge The challenge is to write a code that takes a positive integer 'n' as an input and displays all the possible ways in which the numbers from 1 - n can be written, with either positive or negative sign in between, such that their sum is equal to zero. Please remember that you may only use addition or subtractio...
stackexchange_codegolf
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 A flexagon is a shape that you can flex to reveal faces other than the top and bottom one; we are making a hexahex...
stackexchange_codegolf
Consider the following sequence: 0 1 3 2 5 4 8 6 7 12 9 10 11 17 13 14 15 16 23 ... Looks pretty pattern-less, right? Here's how it works. Starting with 0, jump up n integers, with n starting at 1. That's the next number in the sequence. Then, append any numbers "skipped" and that haven't been seen yet in ascending or...
stackexchange_codegolf
Take a square matrix containing positive integers as input, and calculate the "rotated sum" of the matrix. Rotated sum: Take the sum of the original matrix and the same matrix rotated 90, 180 and 270 degrees. Suppose the matrix is: 2 5 8 3 12 8 6 6 10 then the rotated sum will be: 2 5 8 8 ...
stackexchange_codegolf
Challenge Write a non-empty program/function p that, given a non-empty input string s, outputs the position of the first occurrence of each character of s in the source code of p. For example, if your program is main() { cout << magic << cin } ^0 ^5 ^10 ^15 ^20 ^25 and it receives an input abcd{, the output sh...
stackexchange_codegolf
Backstory You own a tiny jewellery shop in the suburbs of the city. The suburbs are too much overpopulated, so your shop has a thickness of only one character to fit in the busy streets. Recently, there has been lots of cases of robbery on the neighborhood, and you fear that robbers will also come to get your bounty. T...
stackexchange_codegolf
Write a program in language A which outputs a program in language B where: Language A != Language B The output is itself a solution to this question. This is a popularity contest. If you want to define your own BNFs/grammars for this, feel free, but try not to make it too boring by doing so. EDIT: The more languages...
stackexchange_codegolf
Cops thread (read first) Robbers, your task is to find a Shue program p that when given the cops input i, outputs a program h, which outputs "Hello Shue!". The length of your p has to be less than or equal to the length of the cop's p. The robber with the most cracks wins.
stackexchange_codegolf
The Challenge You are to write a complete program that takes seven numbers from STDIN, and prints the two dimensional history of the cellular automaton (CA) to STDOUT. This is code golf. Input Formatting The input will be seven integers/strings separated by commas. The first number is the number of the rule according t...
stackexchange_codegolf
Write a program or function that takes in a positive integer. You can assume the input is valid and may take it as a string. If the number is any of 123 234 345 456 567 678 789 then output a truthy value. Otherwise, output a falsy value. For example, the inputs 1 2 3 12 122 124 132 321 457 777 890 900 1011 1230 1234 ...
stackexchange_codegolf
Task Given a positive integer return the geologic era and period it was that many million years ago. Input/output The input is a string or integer; the output is a string. Eras and periods are separated by slashes (/). Input will always be between 0 and 542 inclusive Data The possible outputs for eras and periods and t...
stackexchange_codegolf
Your task is to build a vim script or provide a sequence of keystrokes that will operate on a single line of text with up to 140 printable ASCII characters (anywhere in a file, with the cursor starting anywhere in the line) and reverse every space-separated string in the sentence while keeping the strings in the same o...
stackexchange_codegolf
Introduction I have an even number of bottles, all of different sizes. Unfortunately, I only know the size of the smallest bottle: 300ml. I also know the following: Half of the bottles are twice the size of the other half, meaning that the smallest small bottle and the smallest large bottle are in a ratio of 2:1. The...
stackexchange_codegolf
The plus-minus sequence The plus-minus sequence is one that starts with two seeds, a(0) and b(0). Each iteration of this sequence is the addition and subtraction of the previous two members of the sequence. That is, a(N) = a(N-1) + b(N-1) and b(N) = a(N-1) - b(N-1). Objective Produce the plus-minus sequence, in infinit...
stackexchange_codegolf
Challenge: given a number, calculate how many unique, order-independent ways there are to achieve a score of that number in American Football. Let's see how few characters can be used in each of your favorite languages! The usual rules apply. Input and output in a way that is natural to your language. Recall that ...
stackexchange_codegolf
Challenge In this challenge, you have to fill an \$M\$ x \$N\$ rectangle grid with the most \$A\$ x \$B\$ rectangle pieces possible. Requirements: The sizes of the \$M\$ x \$N\$ rectangle grid is always bigger than the sizes of the \$A\$ x \$B\$ rectangle pieces. In other words, \$min(M, N) ≥ max(A, B)\$ You can freel...
stackexchange_codegolf
In this challenge, we will together create a word-search containing many programs in different languages. I have started us off with a grid of 60-by-25 blanks (·), some of which are replaced by the characters of a Ruby program. To answer, choose a language that was not yet used. Using your chosen language, write a prog...
stackexchange_codegolf
Your Goal: Given an odd integer input n greater than 1, generate a random English word of length n. An English word is one in which the odd (1-based) indices are consonants and the even (1-based) indices are vowels, the vowels being aeiou. Random For the purposes of this challenge, you are to sample from the vowels and...
stackexchange_codegolf
Invert the Format method. The Format method of the String class (or equivallent, such as sprintf) is available in most languages. It basically takes a "Format" string which may contain placeholders with some extra formatting, and zero or more values to be inserted instead of those placeholders. Your task is to implemen...
stackexchange_codegolf
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 (such as 123,456,789). Round to nearest, h...
stackexchange_codegolf
The prospect of this challenge is: If your program is run normally, all of the code in the speech marks (" - double quotes) should be printed. If your program is wrapped in double quotes (in turn inverting the speech marks), the code that is normally not in quotes should be printed. E.g: Let's say you have the follow...
stackexchange_codegolf
What is the shortest way we can express the function f(a,b)(c,d)=(a+c,b+d) in point-free notation? pointfree.io gives us uncurry (flip flip snd . (ap .) . flip flip fst . ((.) .) . (. (+)) . flip . (((.) . (,)) .) . (+)) which with a little bit of work can be shortened to uncurry$(`flip`snd).((<*>).).(`flip`fst).((....
stackexchange_codegolf
This small challenge derives from my annoyance at discovering that numpy doesn't have a built in function for it. Input An n by m matrix of integers. Output The maximum value in the matrix and the 2d coordinates of one of its occurrences. The coordinates should be in the order (row_idx, col_idx) if your code is no sho...
stackexchange_codegolf
The Lisp language has a family of functions car, cdr, cadr, etc for accessing arrays. For each one, an a defines taking the first item of an array, and a d defines taking the rest. For example, running cadr on [[1,3,4],5,7] will return [3,4] as the a gets the first item ([1,3,4]) and the d removes the first item. We've...
stackexchange_codegolf
Challenge You will be given an input string, anywhere the word "Lemon" is found it should be converted to "Lemonade" but the a, d, and e must be borrowed from somewhere else in the sentence. Example Example Input: I found a lemon when I was a kid Example Output: I foun a lemonade whn I was  kid The Lemonade was c...
stackexchange_codegolf
Suppose we have an array \$\texttt{ps}\$ of length \$n\$ with pointers pointing to some location in the array: The process of "pointer jumping" will set every pointer to the location the pointer it points to points to. For the purpose of this challenge a pointer is the (zero-based) index of an element of the array, thi...
stackexchange_codegolf
Just curious if someone can provide a short example of code that causes a compiler's optimizer to behave incorrectly: without optimization (or at lower optimization), code takes X seconds to run with optimization (or at higher optimization), code takes Y seconds to run where Y > X In other words, the optimizer's cost...
stackexchange_codegolf
Introduction: Aaron is a young game developer. He recently joined the development team of a game where the players select their character from a predefined set, aka "heroes". Unfortunately, the names of the existing heroes are not evenly distributed throughout the alphabet. For example, there are 6 heroes that have a n...
stackexchange_codegolf
Based on the "Pretty Ugly" poem. Input consists of a number of stanzas (positive integer), and four arrays/lists of strings, called the "negatives", "negations", "positives", and "filler" sentences. You must output a "pretty ugly" poem with the specified number of stanzas. A stanza consists of a negative, negation, pos...
stackexchange_codegolf
Story Martians have been observing Aussie rules football matches from space with great curiosity. Having totally fallen in love with the game, they have been inspired to start their very own football league. However, being dim-witted creatures, they are unable to comprehend the scoring system.* We know that in Aussie r...
stackexchange_codegolf
Background There are self-extracting .ZIP files. Typically they have the extension .EXE (and by executing the file they will be extracted) but when renaming them to .ZIP, you can open the file with some ZIP extracting software. (This is possible because .EXE files require a certain header but .ZIP files require a certa...
stackexchange_codegolf
Background The United States has a unique love of gerrymandering––the deliberate manipulation of an electoral district to predict certain voting results. Just recently there was a gerrymandering case brought before the Supreme Court. Gerrymandering, especially when related to race, is ruled illegal and results in the r...
stackexchange_codegolf
This is inspired by Monday Mini-Golf #6: Meeesesessess upp teeexexextext Background ETHproductions have difficulty entering text on his usual webpage. Whenever he use digits or letters, the text will be meeesesessessesseesseessedessed up. Your task is to help him type so the normal behavior is achieved. The transform T...
stackexchange_codegolf
The puppy utility takes a filename as input, and does exactly what you would expect a puppy to do: it shreds it! How to shred Rip out the pages with your teeth Split the input file on newlines. Tear up each page with your paws For each line (not including the linefeed), pick a random integer n such that 2 <= n <= # o...
stackexchange_codegolf
You are fish in a pond that needs to survive by eating other fish. You can only eat fish that are the same size or smaller than yourself. You must create a program that takes a shoal of fish as sorted input. From this you must work out how many fish you can eat and ultimately the size you will grow to. Size chart +----...
stackexchange_codegolf
Let me explain one by one the above terms... We will call \$\text{Z-Factorial}(n)\$ of a positive integer \$n\$, \$n!\$ (i.e. \$n\$ factorial) without any trailing zeros. So, \$\text{Z-Factorial}(30)\$ is \$26525285981219105863630848\$ because \$30!=265252859812191058636308480000000\$ We will call Modified Z-Factorial ...
stackexchange_codegolf
Description Imaginary programming language (IPL) uses Polish Reverse Notation. It has the following commands: i -- input number and push it to the stack o -- non-destructive output top of the stack (number stays on the stack) d -- discard top of stack integer number -- push this number to the stack +-* -- pop two num...
stackexchange_codegolf
sheesh, is this really the 4th? For all you oldcomers, the core challenge is the same, but we are using Java instead of a custom language. Here are the past three CodeBot challenges, in case you are interested. The goal of CodeBots is to make your bot as viral as possible. Each bot carries a Flag, and you need to ma...
stackexchange_codegolf
Imagine that a list of integers describes the heights of some two-dimensional terrain as seen from the side. Stamina: [ 4 4 4 4 4 4 3 3 3 3 2 2 2 - ] O /|\ / \ +---+ +---+ | | | | +---+ ...
stackexchange_codegolf
Husk is a quite new golfing language, created by PPCG users Leo and Zgarb. It has begun being more and more competitive, often staying close or even beating languages known to be very terse, such as Jelly and 05AB1E. Let's list some of the golfing techniques that are somewhat specific to Husk. As always, please post on...
stackexchange_codegolf
Input: A positive integer N. Challenge: Suppose you have a list of integers n = 1, 2 ... N. Output a list of integers, where each number is the maximum power of 2, m, such that 2^m divides each number of n. Test cases: 1 0 15 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, 0 100 0, 1, 0, 2, 0, 1, 0, 3, 0, 1, 0, 2, 0, 1, ...
stackexchange_codegolf
Marshall Lochbaum's online BQN REPL has an interesting(and aesthetically pleasing) method of displaying arrays. Your task is to implement a version with simpler rules. [2,[3],4,[[[6,[5],7]]]] becomes: ┌─ · 2 ┌· 4 ┌· · 3 · ┌· ┘ ...
stackexchange_codegolf
Mathematical Background Let A be an N by N matrix of real numbers, b a vector of N real numbers and x a vector N unknown real numbers. A matrix equation is Ax = b. Jacobi's method is as follows: decompose A = D + R, where D is the matrix of diagonals, and R is the remaining entries. if you make an initial guess solutio...
stackexchange_codegolf
Consider a function plot like this: ########### ################# #################### ...
stackexchange_codegolf
Challenge Create a function or program that, when given an integer size, behaves the following way: If size is equal to 1, output ┌┐ └┘ If size is greater than 1, apply the following substitutions : Source Target ┌ ┌┐└┌ ┐ ┌┐┐┘ └ ┌└└┘ ┘ ┘┐└┘ Note: this is basically a Unicode box-drawing version of the...
stackexchange_codegolf
A binary multiple of a positive integer k is a positive integer n such that n is written only with 0s and 1s in base 10 and n is a multiple of k. For example, 111111 is a binary multiple of 3. It is easy to show that a positive integer has infinitely many binary multiples. See here for a construction proof of one binar...
stackexchange_codegolf
This challenge is one of the two challenges which were planned for Advent of Code Golf 2021, but didn't fit into the 25-day schedule. Related to AoC2020 Day 22, Part 2. Combat is a simple two-player card game played with a deck of cards. A unique positive integer is written on each card. The game proceeds as follows: ...
stackexchange_codegolf
Write a function (or a whole program) that outputs (or prints) an ASCII art of the initial position of Mölkky pins. Output : __ __ __ __(07)__(09)__(08)__ (05)__(11)__(12)__(06) | (03)__(10)__(04) | | | (01) (02) | | |__| | | | | |__| |__| |__| |__| |__| |__| Rules : This is code-go...
stackexchange_codegolf
Problem 4 in the 2019 BMO, Round 1 describes the following setup: There are \$2019\$ penguins waddling towards their favourite restaurant. As the penguins arrive, they are handed tickets numbered in ascending order from \$1\$ to \$2019\$, and told to join the queue. The first penguin starts the queue. For each \...
stackexchange_codegolf
Your task is to take in one integer input and print a zigzag pattern using slashes and backslashes. The integer input determines the length of each zig and zag, as well as the number of zigs and zags The pattern always starts from right to left Test Cases 4-> / / / / \ \ \ \ / / / / \ \ \ \ 2-...
stackexchange_codegolf
The totient function \$\phi(n)\$, also called Euler's totient function, is defined as the number of positive integers \$\le n\$ that are relatively prime to (i.e., do not contain any factor in common with) \$n\$, where \$1\$ is counted as being relatively prime to all numbers. (from WolframMathworld) Challenge Given an...
stackexchange_codegolf
We have a challenge to calculate the hyperfactorial and one to count the trailing zeros of the factorial, so it seems logical to put them together and count the trailing zeros in the hyperfactorial. As a recap, the hyperfactorial of a number, H(n) is simply Πiⁱ, that is, 1¹·2²·3³·4⁴·5⁵·…·nⁿ. It can be defined recursiv...
stackexchange_codegolf
Write a program or function that takes in an integer greater than 1 or less than -1. That is, the input won't be 0, 1, or -1. If the input is 2, the output should be: |\_/| |___| If the input is 3, the output should be: |\_/\_/| |______| If the input is 4, the output should be: |\_/\_/\_/| |_________| The pattern co...
stackexchange_codegolf
The Xerox Alto, originally released in 1973, was the first computer to feature the now-familiar angled mouse pointer. The Alto's bitmapped pointer looked like this (redrawn from Fig. 2 here): Your task in this code-golf challenge is to write a program/function that generates an ASCII art representation of the mouse po...
stackexchange_codegolf
Challenge You will be given a string as an argument. You need to convert that string to upper case. But you can't use any built in method or function nor any external programs. Rule No use of built in methods or functions or external programs. Only arithmetic, bitwise, logical operators, regex, replace, split, join, A...
stackexchange_codegolf
Given n=m^2, return a list of integers that do not border the m x m grid of integers from 1 to n. Examples n=1 (m=1) Grid: [1] Return: [] n=4 (m=2) Grid: [1,2] [3,4] Return: [] n=9 (m=3) Grid: [1,2,3] [4,5,6] [7,8,9] Return: [5] n=16 (m=4) Grid: [ 1, 2, 3, 4] [ 5, 6, 7, 8] [ 9,10,11,12] [13,14,15,16] Return: [6,...
stackexchange_codegolf
So the golf question was like this: You are given a number T and then a total of T number of 17-character strings. For each of the strings, output yes if it contains four consecutive identical characters or contains the substring DX, else output no. The following constraints are promised for each of the 17-character ...
stackexchange_codegolf
Given an input integer from 1, 2, ..., n, the task to write code to make a number as close as possible (as measured by absolute distance) to e using only the four mathematical operations +, -, *, / and parentheses (brackets). You can use any of the integers up to n once but don't have to use all the numbers and you are...
stackexchange_codegolf
Objective You have two knights on a standard chessboard labelled 1-8 and A-H, one knight is located at 1C and the other at 2G. You have to write a program in the language of your choosing that accepts a set of coordinates from stdin, like 2C, and then calculates which of the two knights you have to move in order to cap...
stackexchange_codegolf
Backstory You own a tiny jewellery shop in the suburbs of the city. The suburbs are too much overpopulated, so your shop has a thickness of only one character to fit in the busy streets. Recently, there has been lots of cases of robbery on the neighborhood, and you fear that robbers will also come to get your bounty. T...
stackexchange_codegolf
Introduction If \$\newcommand{\fib}{\operatorname{fib}}\fib(x)\$ calculates the \$x\$th Fibonacci number, write a program that calculates \$\fib(\fib(m))\$ for any integer value of \$m \ge 0\$. (Of course, there will be practical limits based on the language, so lesser limits are acceptable. Also, it's okay to stop at ...
stackexchange_codegolf
A regular dodecahedron is one of the five Platonic solids. It has 12 pentagonal faces, 20 vertices, and 30 edges. Your task is to output the vertex coordinates of a regular dodecahedron. The size, orientation, and position of the dodecahedron are up to you, as long as it is regular. You may output the coordinates in a...
stackexchange_codegolf
You task here is very simple: Given a positive integer n without leading zeroes as input, split it in all possible ways Examples Input->Output 111 -> {{111}, {1, 11}, {11, 1}, {1, 1, 1}} 123 -> {{123}, {12, 3}, {1, 23}, {1, 2, 3}} 8451 -> {{8451}, {845, 1}, {8, 451}, {84, 51}, {84, 5, 1}, {8, 45, 1}, {8, 4, 51}...
stackexchange_codegolf
Write a program or function that outputs/returns the first 10000 prime-indexed prime numbers. If we call the nth prime p(n), this list is 3, 5, 11, 17, 31, 41, 59 ... 1366661 because p(p(1)) = p(2) = 3 p(p(2)) = p(3) = 5 p(p(3)) = p(5) = 11 p(p(4)) = p(7) = 17 ... p(p(10000)) = p(104729) = 1366661 Standard loopholes...
stackexchange_codegolf
Summary A new string manipulation language has been made, using only the characters $+#-!*|@>! Your task is to implement an interpreter for it in as few bytes as possible. Input A string, which is a single line of this language. This can be taken in any reasonable way (stdin, function parameter, command line argument e...
stackexchange_codegolf
Challenge To quote Wikipedia: An octave-repeating scale can be represented as a circular arrangement of pitch classes, ordered by increasing (or decreasing) pitch class. For instance, the increasing C major scale is C–D–E–F–G–A–B–[C], with the bracket indicating that the last note is an octave higher than the first no...
stackexchange_codegolf
I've recently stumbled upon a Russian site called acmp.ru, in which one of the tasks, HOK, asks us to find the LCM of two positive integers. The full statement, translated to English is as follows: The only line of the input contains two natural numbers A and B separated by a space, not exceeding 46340. In the only l...
stackexchange_codegolf
Sometimes when you're playing Wordle, you get to your fifth guess and you can't figure out the word any more, so you start mentally running through the list of remaining iterations, both sensical and nonsensical trying to figure out what those last few letters are. The task here is to create all permutations of a final...
stackexchange_codegolf
Write a polyglot (code that works in two or more languages) that has a "mid-section" that can be modified to do any computational task. This question is similar to https://stackoverflow.com/questions/1053931/code-golf-shortest-turing-complete-interpreter. Rules: The program must be able to preform a computation and pri...
stackexchange_codegolf
Leaderboard User Language Score ========================================= Ell C++11 293,619,555 feersum C++11 100,993,667 Ell C++11 78,824,732 Geobits Java 27,817,255 Ell Python 27,797,402 Peter Taylor...
stackexchange_codegolf
Goal Write a function or a program that when given a string, for example "The quick brown fox jumps over the lazy dog", outputs: T h e q u i e r t h e c v k o l a b s z r p y o m g o d w u n ...
stackexchange_codegolf
So you are tasked with creating an open source password authentication system but you want to reveal as little about the implementation of the hash function as possible. Can you write a function that takes in a password string and a salt string and outputs a salted hash string without revealing the hashing function? En...
stackexchange_codegolf
This is the robbers' thread. For the main rules to this challenge see the cops' thread In this challenge, robbers will choose a cop's vulnerable or safe post and try to figure out a pair of languages such that they print the correct results for the 4 programs. When you find a solution post an answer of it here and lea...
stackexchange_codegolf
Your task is to write a program that, on input n, outputs the minimal expression of each number 1 through n in order. The shortest program in bytes wins. A minimal expression combines 1's with addition and multiplication to result in the given number, using as few 1's as possible. For example, 23 is expressed as 23=((...
stackexchange_codegolf
How well do you know the site? Let's find out. This is a cops-and-robbers challenge. Cop's thread. As a robber, you need to: Find a non-deleted, non-closed challenge that matches a cop's submission. The challenge cannot have the following tags: cops-and-robbers, popularity-contest, code-trolling, underhanded, busy-...
stackexchange_codegolf
Input variables: (Names are just examples, they don't need to be named like this) GrandTotal - integer to divide SplitCount - number of output integers required UpperLimit - highest valid value for any one output integer LowerLimit - lowest valid value for any one output integer Valid Output: Outout must be a random ...
stackexchange_codegolf
Note: In this post, the terms 'character' and 'color' mean essentially the same thing This image: can be represented as ....'''333 .eeee'''3e ..dddd33ee %%%dd####e (mapping colors to ascii characters) The four color theorem states that "given any separation of a plane into contiguous regions, producing a figure cal...
stackexchange_codegolf
Two dimensional chiral objects are not chiral in three dimensional space. This is because you can flip them over which is equivalent to taking the mirror image unlike in two dimensions where only rotations in the plane of the object are allowed which cannot reproduce the effect of a mirror operation. In this challenge,...
stackexchange_codegolf
Note, challenge copied from question asked at math.stackexchange. Recently, I attained quite some skill at blowing bubbles. At first I would blow bubbles like this: But then things started getting strange: After a while, I was blowing some pretty weird bubbles: After blowing hundreds, maybe even thousands of such bu...
stackexchange_codegolf
Sometimes when you're playing Wordle, you get to your fifth guess and you can't figure out the word any more, so you start mentally running through the list of remaining iterations, both sensical and nonsensical trying to figure out what those last few letters are. The task here is to create all permutations of a final...
stackexchange_codegolf
Challenge You need to generate a program or function that takes in a positive integer N, calculates the first N terms of the Fibonacci sequence in binary, concatenates it into a single binary number, converts that number back to decimal, and then outputs the decimal as an integer. For example 1 -> [0] -> 0 to decimal o...
stackexchange_codegolf
You are in fact writing an interpreter for the language "Wrong keyboard position". You can pretend that you are not doing this and just follow the instructions below. I typr re;atively accuratrly, but so,etimes I made a whole nlock of text illegible by shifting a key right. So I need a program that corrects my text ba...
stackexchange_codegolf
This should be easy: given an arbitrary string, your program will give it a name. Requirements Your program will accept an input of a UTF8 string, and output a string representing the input's "name", how you define this name is arbitrary, but it must comply with some conditions. I/O Ranges The input will at most be 382...
stackexchange_codegolf
This is my first question in Code golf I found it in stack-overflow (originally in JavaScript however all languages are acceptable): Render on screen NxN (where N in range 1-16) grid where each cell have black boundary and red number inside - cells are numerated in hex starting from left-upper corner to bottom-right. E...
stackexchange_codegolf
Background There's a terrible problem in my console - the quotes never get included inside the arguments! So, when given this argument: ["abc","def","ghi","jkl"] it says that the argument is like this: [abc,def,ghi,jkl] It would be very nice if you can fix this problem! Challenge Add double-quotes (") in order to sur...
stackexchange_codegolf
Given you have an infinite sequence of numbers defined as follows: 1: 1 = 1 2: 1 + 2 = 3 3: 1 + 3 = 4 4: 1 + 2 + 4 = 7 5: 1 + 5 = 6 6: 1 + 2 + 3 + 6 = 12 7: 1 + 7 = 8 ... The sequence is the sum of the divisors of n, including 1 and n. Given a positive integer x as input, calculate the lowest number n which will produ...
stackexchange_codegolf
Input: A Date (containing dd, MM and yyyy). A date-object, or three separate integers are also valid as input. Output: Each part (dd, MM and yyyy) individually reverted and than rounded to the nearest valid date. For example (in the format dd-MM-yyyy): 21-10-2016 becomes 12-01-6102 Challenge rules: Only dd, MM, yyyy i...
stackexchange_codegolf
You wake up and find out that your computer has been stolen! You have a few sensors and scanners, but unfortunately, the footage is incomplete, so you want to find and rank your suspects for further investigation. Your computer is a rectangle, and your camera caught a bunch of people walking around with packages; howev...
stackexchange_codegolf
This post is loosely inspired by this mathoverflow post. A Vanisher is any pattern in Conway's Game of life that completely disappears after one step. For example the following pattern is a size 9 Vanisher. An interesting property of Vanishers is that any pattern can be made into a vanishing one by simply adding mo...
stackexchange_codegolf
In this code golf, you will have to determine the direction of the shortest shot that hits exactly n cushions before falling into a pocket. The billiard table is a 6 pocket pool table with the following characteristics: Dimensions are variable (a x b) No friction : the ball will roll forever until it falls into a pock...
stackexchange_codegolf