instruction
stringlengths
34
53.1k
Instructions Your goal is to write code that makes a "string" from a string in the least amount of bytes possible, as per the rules of code-golf. Standard loophole rules apply. To make a string, you have to assume the string contains only alphabetical characters and basic punctuation such as the period, comma, colons a...
First, a few definitions: Given n and k, consider the sorted list of multisets, where for each multiset we choose k numbers from {0, 1, ..., n-1} with repetitions. For example, for n=5 and k=3, we have: [(0, 0, 0), (0, 0, 1), (0, 0, 2), (0, 0, 3), (0, 0, 4), (0, 1, 1), (0, 1, 2), (0, 1, 3), (0, 1, 4), (0, 2, 2), (0,...
I have an issue with my keyboard (more likely an issue with my browser). Some times when I click on a new text field and begin typing all my text comes out backwards. After a very short amount of time (for the purpose of the challenge we will say it is 10 milliseconds) it resumes typing forwards again. It seems that ...
We'd like to factorize a semiprime \$N\$. The goal of this challenge is to find two small integers \$u\$ and \$v\$ such that \$uvN\$ can be trivially factorized with Fermat's method, thus allowing to easily deduct the factors of \$N\$. The task Given a semiprime \$N\$ and a positive integer \$k\$, we define \$x\$ and \...
My boss just told me to write a cosine function. Being a good math geek, my mind immediately conjured the appropriate Taylor Series. $$\cos(x) = \frac 1 {0!} - \frac {x^2} {2!} + \frac {x^4} {4!} - \frac {x^6} {6!} + \cdots + \frac{(-1)^k \times x^{2k}} {(2k)!} + \cdots$$ However, my boss is very picky. He would like t...
Using our familiar mathematical symbols: +, x, parenthesis, and any rational number, it's easy to create expressions that evaluates to some desired number. For example: 1+(2x3)=7, (1+2)+(3x6.5)=22.5 and so on. Boring enough. In this challenge, we'll use a new operator: ±. The use of ± in an expression means you need to...
Some of you may say that I am wasting my time, but this task does not give me peace for more than 500 days. It is required to write a program in Python 3.x that takes two numbers as input and displays their sum. The numbers are given in the following format: a b Some example test cases: 100 500 -> 600 3 4 -> 7 Th...
Make me a s'more! I tell you the width, the amount of graham cracker, the amount of chocolate, and the amount of marshmallow. An example: Input: Width: 10 Graham: 3 Chocolate: 2 Marshmallow: 1. Output: GGGGGGGGGG GGGGGGGGGG GGGGGGGGGG CCCCCCCCCC CCCCCCCCCC MMMMMMMMMM GGGGGGGGGG GGGGGGGGGG GGGGGGGGGG Is it that easy? U...
Given two strings, find the translation table (substitution cipher) between the two, if the translation is not possible, output false. The answer must be minimized and created from left-to-right. The first character to be translated between words must be the first in the translation table. In addition to this, any lett...
This task is rather simple, and makes use of three distinct "operator" characters. Your task is, given a simple sequence of letters, perform the following task to encode it using <,>,*. You may choose to use either upper or lowercase letters, you do not have to handle both. Cipher Explanation The cipher is simple, you...
Your challenge is to make a program or function that outputs the GCD of its inputs in one language and the LCM of its inputs in another. Builtins for GCD or LCM (I'm looking at you, Mathematica) are allowed but not encouraged. There will be 2 inputs, which will always be positive integers, never greater than 1000. Test...
The Rundown Given any input x and y, perform a complex operation, and print a corresponding result. How your program should work Given an input x and y in the form z = x+yi, find zi-z If the absolute real value of zi-z is larger than the absolute imaginary part, print the real part; vice versa for the other way around...
Your mission today is to create a vortex given a single parameter. This parameter determines the length of each arm in characters. Each "layer" of each arm contains one more character than the last. Here's how the vortex will look, given the arm length: 0: # 1: # ### # 2: # # # ### # # # 3: ## # ...
Well, everyone loves Polyglots. You will be given two integers, in any standard form of input (no hardcoding). Your task is to write a polyglot which finds the minimum value in a language and the maximum value between the two numbers in the other language, and performs the following operations: The code which finds th...
Your submission must take a list of numbers (in whatever list format your language supports, or using multiple function / command-line parameters) or a string of numbers separated by any character that is not 0123456789. In one language, it must add all of them and output the sum. In another language, it must output th...
Definition A dollar word is a word where when each of its letters is given a cent value, from a = 1 to z = 26, and the letters are summed, the result is 100. Here is an example on CodeReview, and here is a list of dollar words I found online. Input Input will be alphabetical from a-z, in your one language's text dataty...
Challenge Given a user's name (not ID, we have that challenge already), output their current reputation and their ID. Input Input will be a single string which is the user's username. You may assume that this user exists. Output Output will be two integers to either STDOUT or STDERR which will be the user's reputation ...
The challenge is simple Write a script that, when given a string input, will hash the string using the MD2 hashing algorithm, and then return either a positive integer or negative integer output based on which character set below is more common in the resulting hash as a hexadecimal string: 01234567 - (positive) 89abcd...
Sometimes a long absolute path, in e.g. a command-line parameter to a linux tool, can be shortened, using current working directory as reference: $ pwd /home/heh $ cat /home/heh/mydir/myfile my stuff $ cat mydir/myfile my stuff In this challenge, you should make a function or a program that receives two parameters: ...
The following puzzle was asked in puzzling SE. This puzzle is quite hard to solve by hand because every answer depends on another answer. So, for example, a solution with all answers being A does not work because then the question 7 would contradict question 8, for example. One of the answers there at puzzling SE sugge...
Write a function, f, that takes in a positive integer and returns a function. The new function returned should be identical to f. However, when the "termination call" happens, f should instead return the sum of all integers passed. For example, g=f(4) (if f is the first function) should set g to another function. h=g(...
Challenge Create a program that, when run, changes the contents of the source file. This means that you can delete/add/change characters in the source file, but you can't delete the (source) file itself (deletion is when the source file does not exist after the program is run). In the case of pre-compiled languages suc...
I was messing around on my 'ol TI-84 CE and made a program that produced this output (it was actually bigger but that is not the point): * * * * * * * * * * * * * * * * * ... I evolved it to take input text and make the triangle waves out of that. The final step was to also take a number to specify th...
As you may very well know python has lists. As you might not know these lists can contain themselves. a = [] a.append(a) Python 2 Python 3 These are cool and there are lots of interesting things you can do with them, however you cannot compare them. a = [] a.append(a) b = [] b.append(b) a == b Python 2 Python 3 Task...
Challenge Given a number x, output the first x powers of two, starting with 2¹ (2). Example 2 2 4 3 2 4 8 1 2 6 2 4 8 16 32 64 You may output numbers separated by non-numerical characters. You may not just output them mashed together like 248163264128. Rules In your code, you may only use the number 2. You m...
Given a non-empty set of strings and a list of strings, find out how many times the set occurs in the list, i.e. how many times you could create the set with items from the list. Every element from the list can only be used once. Hint: a set is an unordered list of unique items. Default input/output rules apply. No e...
Introduction One day, you were showing your kid how to draw on a computer. You type mspaint.exe in the run bar. To your horror, it says "No items match your search". You must create a simple version of paint so your kid can draw! Challenge You must create a simple drawing program. To do this, open a white display windo...
Challenge: To take two points on the plane and figure out the position of the point that's a) on the line that connects them, and b) equally distant from each of the original points. Example: (0,0), (3,3) -> (1.5,1.5) (-1,-1), (1,1) -> (0,0) (-7,3), (2,-2) -> (-2.5,0.5) (3, 1), (-5,9) -> (-1,5) Rules: The input an...
Introduction Connect Four is a game where you attempt to get four in a row: horizontally, vertically, or diagonally. In this code golf, we will be trying to find who won, given a game board. There will always be one winner, and only one winner. Task Given a Connect Four board, figure out who the winner is: X or Y. ...
Every palindrome with an even number of digits is divisible by 11, so 11 is the only [palindromic prime] with an even number of digits. - David Wasserman, OEIS I learned this today the manual way, before I did my research, when my program skipped numbers with an even number of digits (except 11) when calculating pali...
And no, This is not a dupe of Translate ASCII text to braille. There are 28=256 Braille patterns in Unicode. (By 'Braille' I mean 8-cell ones) W, wait. How many ASCII characters were there? 27 = 128? Well then, Let's turn ASCII into Braille, 'cause there is absolutely no reason not to! The way from ASCII, to Braille...
Everyone is likely familiar with the following song, which is a musical round: Background Fewer people might recall trying to sing the 4-person version of this with a few friends and failing. Offsetting the lyrics of a song with different harmonious pitches is known as singing a "round" and that's what we're here to s...
The ECMAScript 6 standard added many new features to the JavaScript language, including a new arrow function notation. Your task is to write a basic ES6-to-ES5 transpiler. Given only an ES6 arrow function as input, output its ES5-compatible counterpart. It's code-golf! May the shortest program in bytes win! The Basics...
This is a good beginner challenge and a good time killer. I only said a -natural- log because the title was too short, this has nothing to do with logarithms. Given 2 variables: The number of ants n. The width of the log w. Output a log of width w with n ants (Example shown w=3, n=6) | | | \O/ \O/ \O/ | ...
Charcoal is a language created by ASCII-only and DLosc that specialises in ASCII art challenges. What tips do you have for golfing in Charcoal? Obviously I am looking for tips related specifically to Charcoal, not those which can be applied to most - if not all - languages.
Spring has recently arrived, and it is almost the time when flowers start to sprout. So I want you to help them grow. Your task: Given two numbers, m, and n, output m flowers randomly placed on an n*n grid. A single flower looks like this: & | A flower's position is defined by where its & is. When randomly placing two...
Challenge Given a SE user's ID, output the sum of their reputation from across all of the Stack Exchange networks​ the user has signed up to. Rules If a user has 101 or less reputation on a site, count it as zero in the sum. You should not count Area 51 rep or hidden communities!! URL shorteners are disallowed. Example...
For robbers' post, Cheapo Enigma machine (Robbers) A cop's submission will consist of a program/function that accepts a single byte of data and return a single byte of data. Every possible input must produce a unique output. (In the other words, your function must be bijective) Robbers will attempt to create the invers...
For cops' post, Cheapo Enigma machine (Cops) A robber's submission consists of a program/function that accepts the output of a cop's code and returns the input for all the outputs provided by that cop's code. (In other words, you must write the inverse function) You cannot use built-ins that have the sole purpose of ha...
Background: Okay, i dropped my android smartphone and damaged the touchscreen The lower half (yeah, exact half!) is spider-webbed and does not work (potrait-mode) Fortunately for me, the display itself is working My phone is already rooted and adb enabled, so i have managed to enable 360 degree display rotation Using t...
You know how you get a voicemail message and the person's connection wasn't great, and you're trying to figure out how to call them back, but you're not sure if that was a "5" or an "8" they said? That's this challenge. The good news is that the caller read off their number twice, but it's garbled in both places. Your ...
From Wikipedia: Chopsticks is a hand game for two players, in which players extend a number of fingers from each hand and transfer those scores by taking turns to tap one hand against another. In this challenge "splits" can only be 4->2+2 or 2->1+1. Challenge Your challenge is to make a bot (think the AI and framewor...
Introduction You started to write a "Hello, World!" program, but after you wrote the part to print the hello, you forgot what your program should actually print. So now, you somehow managed it to write a program which can check if the entered word is what you search. The task Your task is to write a program or function...
Your task: make a hexagonal triangle with side length n, where n is a positive whole number or 0. First, let me define a hexagon: / \ | | \ / (Amazing ASCII art, right?) Hexagons can be linked together by sharing sides: / \ / \ | | | \ / \ / / \ | | / \ / | | \ / A hexagonal triangle is the fo...
I saw a cool gif of the twin dragon curve made from a square, and wondered what would happen if we started from another base image. So I wrote a program to do this.                                         It's so cool that I thought it would be fun to do it as a challenge. Task You will take in a square image with an ...
Your task is to create a program which, given an input string, will output the first Google autocomplete result for that search. The format of input/output is up to you. Rules Your program must take 1 input, a string, and output the top Google autocomplete/auto-fill suggestions result. The format of input/output is up...
Do you have any code-golf tips for writing in SOGL, a golfing language created by dzaima? Your tips should be at least somewhat specific to SOGL. Please post one tip per answer.
Intro Reverse and add is as simple as it sounds, take n and add it to its digits in reverse order. (e.g. 234 + 432 = 666). If you apply this process repeatedly some numbers will eventually hit a prime number, and some will never reach a prime. Example I currently have 11431 rep. 11431 is not prime 11431 + 13411 = 2484...
Challenge Given two question IDs, try to figure out how similar they are by looking at the answers. Details You will be given two question IDs for codegolf.stackexchange.com; you may assume that there exist questions for both IDs that are not deleted, but are not necessarily open. You must run through all of the answer...
You must make a polyglot that outputs its source code in one language and its source code backward in another. Unlike the normal rules, you are allowed to read the current file or use a builtin to get the source code of your submission and reverse that in one language. Your source code cannot be a palindrome. For examp...
In: a string without line breaks* Allow the user to edit and submit the line Out: the modified string (optionally with a trailing linebreak) The line editor must at minimum allow the user to: move a visible cursor left and right insert and/or overwrite characters at the cursor position remove characters at the curso...
Your task is to determine how much of a perfect palindrome a string is. Your typical palindrome (eg 12321) is a perfect palindrome; its perfectness is 1. To determine the perfectness of a string, you see how many sections you can split it into where each section is a palindrome. If there are ambiguities, such as with a...
Task: Your task is, when given three inputs: a numerator n a denominator d another integer, x Create a program/function that finds the xth digit of the number after the decimal place. Specs: The range of n and d is between 1 and 2^31 - 1, inclusive. The range of x is between 1 and 10,000,000, inclusive. You may ch...
There was a discussion going on in TNB once about the best temperature scale, and we agreed on something: Take the average of all four main temperature scales! That is, Celsius, Kelvin, Fahrenheit, and Rankine (Sorry Réaumur). So, now the issue is, most people don't use this system. So, I need a program to convert back...
If you're going to invent some fake news, you'll want to fabricate some data to back it up. You must already have some preconceived conclusions and you want some statistics to strengthen the argument of your faulty logic. This challenge should help you! Given three input numbers: N - number of data points μ - mean o...
This challenge was inspired by @HelkaHomba's excellent challenge Red vs. Blue - Pixel Team Battlebots. That challenge was probably the best one I've seen on this site. Ever. My challenge is still a lot different, but @HelkaHomba deserves credit for the inspiration. Overview This is a team king-of-the-hill where your t...
I read this question and thought it would make a nice challenge. Task Give an input 0<n<10 generate a random number with exactly n digits the first not a 0 so f(n)>10**(n-1)-1 distinct digits Winning criteria This is code-golf so shortest code wins. Random I mean evenly distributed random. So from the view of the ...
Circa 1976. With the success of the Tiny BASIC Design Note, a variety of Tiny BASIC IL implementations now span a range of microcomputers. The time has come to expand the Tiny BASIC standard. Grammar revisions: (LET) var = expression INPUT (string ,) var-list PRINT expr-list (;) IF expression relop expression (THEN) st...
I was watching the world snooker championship and it got me wondering.. Snooker scoring In the game of snooker there are certain rules that you must adhere too: When there are red balls on the table, during your turn you must first pot a red ball After potting each red ball, you must pot a colored (not red) ball (the ...
As you may know it, the factorial of a positive integer n is the product of all the positive integers which are equal or smaller to n. For instance : 6! = 6*5*4*3*2*1 = 720 0! = 1 We will now define a special operation with an irrelevant name like sumFac: Given a positive integer n, sumFac(n) is the sum of the factori...
Definitions You can skip this part if you already know the definitions of groups, finite groups, and subgroups. Groups In abstract algebra, a group is a tuple (G, ∗), where G is a set and ∗ is a function G × G → G such that the following holds: Closure: for all x, y in G, x ∗ y is also in G (implied by the fact that ∗...
In preparation for the AP Computer Science AP Test (Java), our teacher has been giving us FRQs from previous years for practice. My friend and I were golfing this during class today and got it as short as we could, but I'd like to see if there are any shorter solutions any of you can come up with. Rules: You must use ...
Given a number n and an upper limit l list the numbers that can be created by multiplying two or more numbers consisting of only sevens of length n or less that are less than l. A161145 is close to this challenge, however, you will NOT be including the 7, 77, 777, 7777, 77777, etc.. Examples n=anything, l<49 would resu...
Consider a connected undirected graph. A matching set of edges on this graph is defined as a set of edges such that no two edges in the set share a common vertex. For example, the left figure denotes a matching set in green, while the right figure denotes a non-matching set in red. A matching set is said to be maximal...
Ah, yet another of my selfish uses of this Stack. Being a Chromebook owner, I'm a frequent user of the Ace IDE, the editor used by Cloud9. It has lots of tools for dealing with excess whitespace, but it notably lacks one: clearing empty lines. Your mission today is, given an input from a place I can copy-paste to [;)],...
What I want: Quite simply, I want a text based display, that asks for an input, n, then shows that value on the display! But there's a catch. Each of the 'true' 'pixels' (the ones filled in) has to be represented by that number n.. Example : You are given an input n. You can assume n will be a single digit Input: 0 O...
This question is the first of several Brain-flak Birthday challenges designed to celebrate Brain-Flak's first Birthday! You can find more information about Brain-Flak's Birthday here Last summer we had the Brain-flak Integer Metagolf, and the answers it generated have been very useful to the Brain-Flak community sinc...
Dennis puts in a huge amount of effort for this community, including as moderator, language designer, and provider of TIO. Unfortunately, his four-year-old daughter has caught a cold, so let us all help him keep track of her recovery (may it be speedy) by providing him with a thermometer: .-----------. | | | ...
The French spell out numbers in a peculiar way. 1-16 are "normal" 17-19 are spelled out 10+7. 10+8, 10+9. 20-69 are "normal" (OK, OK! Not really, but they are in this challenge) 70-79 are 60+10, 60+11 ... 60+10+7, 60+10+8, 60+10+9. 80-99 are 4*20, 4*20+1, 4*20+2 ... 4*20+16, 4*20+10+7, 4*20+10+8, 4*20+10+9 Challen...
Inspired by a question over at Stack Overflow. The title here is entirely my fault. The challenge Given a list of positive integers containing at least two entries, replace each number by the minimum of all entries excluding itself. Test cases [4 3 2 5] -> [2 2 3 2] [4 2 2 5] -> [2 2 2 2] [6 3 5 5 8] -> [3 5...
Given a positive integer < 100 (from 1 to 99, including 1 and 99), output that many lockers. A locker is defined as the following: +----+ | | | | | | | nn | +----+ where nn is the locker number, in base 10. If there is 1-digit number, it is expressed with a 0 in front of it. For example, locker number 2 displ...
Backstory You wake up dizzy in a chemistry laboratory, and you realize you have been kidnapped by a old mad chemist. Since he cannot see very well because of his age, he wants you to work for him and only then, you can escape the laboratory. Task It is your task to return the structural formulae of the molecules whose ...
Your task is to translate a 103-smooth number into an English word, using the method described below. How? Generate the list of prime factors (with repetition) of the input number. Sort the list: If 2 is not one of the prime factors, sort the list in ascending order. If 2 is one of the prime factors, remove it from ...
...or is there? Your challenge is to parse my lunch bill, which contains the base price, tips, discounts, coupons, and extras and find out if my lunch was $0 or less. If this is the input: 12.34 15 tip 25 discount 1.5 extra 2 coupon Then the output might be false. Here's how it works: 12.34 is the base price. 15 tip m...
This question is the second of several Brain-flak Birthday challenges designed to celebrate Brain-Flak's first Birthday! You can find more information about Brain-Flak's Birthday here Challenge For this challenge you'll be generating all fully matched strings from a list of brackets. To borrow DJMcMayhem's definition...
Recently, I've seen Hare Krishna people with their mantra on the emblem and I've found it may be quite interesting to code golf. The challenge Write the Hare Krishna mantra, i.e.: Hare Krishna Hare Krishna Krishna Krishna Hare Hare Hare Rama Hare Rama Rama Rama Hare Hare Winning criteria This is code-golf, so shortest...
Given a string s and an array/list l, determine whether or not s can be made with parts from l. For example, if the string is "Hello, world!" and the list is [' world!', 'Hello,'], then the program/function should return a truthy value, because you can arrange the list to form the string. The following list would also ...
Say you list the positive integers in a triangle, then flip it left-to-right. Given a number, output the number it's sent to. This is a self-inverse mapping. 1 1 2 3 3 2 4 5 6 <---> 6 5 4 7 8 9 10 10 9 ...
m|Y bR|ain is We|iRd. F(o)R T(h)E La|sT fi(v)e YE|ars O|R s|o, (I) ha|ve C(u)T wO|rds in h(a)lf wh|En (I) s(e)e Th|em. Wh|EN I started Do|ing it, it To|oK a meN|TaL effort - B(u)T I almost cou(l)dn't N(o)T d|o it. N(o)w, I d|o it in the back of my head, a(n)d hardly ev|en not|iCe it. However, I thought this wo|uld make...
The alphanumeric characters have ASCII-values: 0-9 -> 48-57 A-Z -> 65-90 a-z -> 97-122 Your challenge is to take an integer as input, and output how many characters can be made using consecutive digits of that number. The character codes may be overlapping. 666 should result in 2, since you have 66 twice. Test c...
Write functions \$x(a)\$, \$y(a)\$ and \$z(a)\$ such that for any rational \$a\$ all functions return rational numbers and $$x(a) \times y(a) \times z(a) \times (x(a) + y(a) + z(a)) = a$$ You may assume \$a \ge 0\$ You do not need to use rational types or operations in your program, as long as your program is mathemati...
Your task is to write a program that outputs the exact string Programming Puzzles (trailing newline optional), but when all spaces, tabs, and newlines are removed it outputs Code Golf (trailing newline optional.) Your byte count is the count of the first program, with spaces still there. Notes The spaces in Code Golf...
This is a variant on the self-replicating program, defined here as a program that outputs its source (or a quine). Below is an example of a self-replicating program in Python: s = 's = %r\nprint(s%%s)' print(s%s) When run from a file, this script should output itself. Instead of a self-replicating program, I want you ...
The keyboard layout people commonly use is the QWERTY layout as shown below. But there are also other keyboard layouts: DVORAK COLEMAK WORKMAN Your task Your code will take two inputs: the name of the keyboard layout and a string to transcribe. Your goal is to convert your QWERTY input as if you were typing with t...
What I want: Take an input, x Take a formula. It has to be capable of reading something in the format: ax^m + bx^n + cx^o ... where m, n, o and any terms after that can represent any value. coefficients, again for any number. For example, 6x^2. (That means 6(x^2)) Doesn't necessarily have to put up with spaces times, ...
Your task is to find the nth Fibonacci number, but n is not necessarily an integer. The Fibonacci sequence, 0-indexed, goes as follows: 0, 1, 2, 3, 4, 5, 6, 7, ... 1, 1, 2, 3, 5, 8, 13, 21, ... However, what happens if we want the 2.4th number? The 2.4th number is 0.4 times the difference between the 3rd and 2nd F...
This was one of a series of challenges leading up to Brain-Flak's birthday. Find out more here. Challenge For this challenge your objective will be to find the very first pair of matching brackets in a fully matched string of ()[]{}<> brackets. To borrow DJMcMayhem's definition of a fully matched string: For the pur...
Taken from: OEIS-A071816 Your task, given an upper bound of n, is to find the number of solutions that satisfy the equation: a+b+c = x+y+z, where 0 <= a,b,c,x,y,z < n The sequence starts out as described on the OEIS page, and as below (1-indexed): 1, 20, 141, 580, 1751, 4332, 9331, 18152, 32661, 55252, 88913, 137292, ...
Logo is a programming language that was designed back in 1967 that has great potential for creating graphics in relatively few bytes compared to other languages. Logo is an educational programming language that utilizes Turtle Graphics. There are multiple interesting implementations of Logo including: Apple Logo Atari...
Definitions Euler Phi Function (AKA totient function): a function which takes in a positive number and returns the number of positive numbers less than the given number which are co-prime with given number. It is denoted as φ(n). Reachable number: if there exists a positive integer x such that φ(x) == n, then n is rea...
Brain-flak turns one year old tomorrow! In honor of it's birthday, we're having a PPCG style birthday party, where several users post brain-flak related questions! Help us celebrate! :) Brain-flak is an esoteric language I wrote where all of the commands are brackets and all of the brackets must be fully matched. To...
After giving back the results of the last topology exam to his students, Pr. Manifold was worried about complaints. Since he is aware his students know where his office is located, Prof. Manifold decided to transform his office into a bunker with a 10 digit password (all characters are digits). But he suspected his st...
Given a non-negative number n, sort the digits of n by their first occurrence in pi. Input can be taken via function cli argument, or STDIN and as a string, char[] or integer. You may output via return value, exit status or STDOUT.
I am currently working on a golfing language. Do you have any suggestions for this language? What are some helpful features of a good golfing language? What features do you find useful? Do you suggest a language based on variables, stack(s), tapes, registers, etc? As usual, please post separate tips in separate answers...
I am writing a golfing language. Do you suggest variables, stack(s), tapes, registers, etc for storage in a code-golf language? What about implicit input? Rough definitions: A variable is simply a name (usually one character long in golfing languages) that a value can be assigned to, and later retrieved by that name....
Challenge: I have thousands of songs in my music collection, and luckily for me, my favorite player has a search function. I also have a great memory—I can remember the title of every song in my collection. However, I'm very lazy and don't like to type—each extra keystroke is a chore! What is the shortest string I mus...
The problem is I need to skip or delete all the lines between the two keywords in a file and the keyword pair will appear many times in the file.The file looks something like this . . .......... .......... Hello world .......... .......... welcome . . . .......... .......... Hello world .......... .......... welcome . ...
This question is part of a series Brain-flak Birthday challenges designed to celebrate Brain-Flak's first Birthday. You can find more information about Brain-Flak's Birthday here. Today is Brain-Flak's first Birthday! So I thought we would throw it a surprise birthday party. So in your favorite language print Surp...
In this challenge, you will calculate what your reputation would be, if the reputation cap didn't exist on PPCG. Everyone can access the rawdata for reputation changes on the adress: codegolf.stackexchange.com/reputation. The raw data follows a setup like this (these are the first few lines of my version of the page. t...
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...