instruction stringlengths 34 53.1k |
|---|
Another easy challenge for you.
Your task
Write a program or function that takes the input, which contains 3 pairs of x- and y-coordinates and calculates the area of the triangle formed inside them. For those who can't remember how to calculate it, you can find it here.
Example:
1,2,4,2,3,7 # input as x1,y1,x2,y2... |
(This is a variation on Print a Negative of your Code, which I enjoyed a lot! Thanks to Martin Büttner♦ - almost all of this text is his.)
Let's consider the symbols to be the following printable ASCII characters (note that space is included):
!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~
And the alphanumerics to be these:
012345... |
Goal
Sometimes dinner menus can have long winded names. It's much easier for the waiter to write an abbreviation that unambiguously identifies the dish.
For example, given this list:
beef burger
chicken burger
chicken nuggets
The abbreviation c n matches chicken nuggets.
The abbreviation bur matches beef burger and c... |
(I'm not a chemist! I might be wrong at some stuff, I'm writing what I've learned in high-school)
Carbon atoms have a special attribute: They can bind to 4 other atoms (which is not that special) and they stay stable even in long chains, which is very unique. Because they can be chained and combined in a lot of differe... |
Challenge
Given a list of numbers, calculate the population standard deviation of the list.
Use the following equation to calculate population standard deviation:
Input
The input will a list of integers in any format (list, string, etc.). Some examples:
56,54,89,87
67,54,86,67
The numbers will always be integers.
Inp... |
Given a snippet of fizz buzz output with all numbers removed, fill in the correct numbers with the lowest possible values such that the fizz buzz snippet is correct. For the purposes of this challenge, fizz and buzz have their usual values of 3 and 5, respectively.
If the input is an invalid sequence of fizz, buzz and... |
I have come across a question on the Code Review site that seems interesting. I think OP is doing it wrong, but cannot be sure... So let's solve it for him! (write a program, not a function/procedure)
Input (stdin or similar):
An integer x in decimal notation. It is greater than 1 and less than 2^31.
Output (stdout or ... |
Write a program or function that takes in an eight byte string containing one of each of the characters ()[]{}<> arranged in any way such that the four respective bracket types match. For example, ]<([){}> is invalid input because the square brackets don't match (though all the others do).
Print or return an integer fr... |
This question is inspired by ongoing tournament of "the hooligan's game played by gentlemen", the Rugby World Cup, which has just completed the pool stage. There are 20 teams in the tournament, and they are divided into 4 pools of 5 teams each. During the pool stage each team plays against all the other teams in their ... |
Objective
The black pawn wants revenge. Plot out its last attack.
Rules
The black pawn (L) starts at the top row and moves downwards to the bottom row. Maximise points taken, indicating the path with X. Pawns (P) are 1, bishops (B) and knights (N) 3, rooks (R) 5, and queens (Q) 9. There won't be any kings in the input.... |
For many games played on a grid, hexagons are the Clearly Superior Choice™. Unfortunately, many free game art sites only have seamless tile sets for square maps. On a past project, I used some of these, and manually converted them to hexagons.
However, I've gotten lazy in my old age. It should be easy to automate the p... |
Introduction
In this challenge, your task is to simulate a certain type of elimination game.
In the game, the participants stand in a circle, and everyone is holding an integer.
On each round of the game, every participant points at the person n steps away, if n is the number they are holding. If n is positive, they co... |
The Challenge
You are the owner of an amazing service called Coyote Beta, which magically answers math questions its users send to it over the internet.
But it turns out, bandwidth is expensive. You have two choices, either create a "Coyote Beta Pro" or find some way to solve this. Just recently, someone queried (x +... |
Golf Me An OOP!
Two important components of object-oriented programming are inheritance and composition. Together, they allow for creating simple yet powerful class hierarchies to solve problems. Your task is to parse a series of statements about a class hierarchy, and answer questions about the hierarchy.
Input
A seri... |
In various Super Mario games green and red Koopa Troopa shells can slide frictionlessly on flat surfaces and destroy brick blocks that are in their way. When a shell hits a brick block the block breaks, turning it into empty space, and the Koopa shell reverses direction. As an example, watch the red shell here.
Suppose... |
Try to write some code in your language and make it not satisfying our criteria of being a programming language any more.
A language satisfies our criteria (simplified version for this challenge) of being a programming language if:
It can read user input representing tuples of positive integers in some way.
It can out... |
The Challenge
A bubble sort takes a list of non-repeating integers and sorts them in ascending order, with only the use of one operation: switching two numbers which are next to eachother.
However for this puzzle, you must take in two strings, which are both anagrams, and bubble sort the letters of the first string int... |
I've got some Java pseudocode that uses whitespace instead of curly braces, and I want you to convert it.
I/O
Your program should take an input file along with a number designating how many spaces are used to indent a block. Here's an example:
$ convert.lang input.p 4
// Convert using 4 spaces as the block delimiter
$... |
I'm sure everyone has seen before that cups can be stacked into pyramids (and other shapes):
A
A A A
A A A A A
A A A A A A A A
Yes, A is definitely an adequate character to represent a cup.
New cups could be added either on the ground, to the right of the structure, or on top of two ad... |
If you've ever tried adding labels to a really dense plot, then you'll realise that sometimes labels will overlap one another, making them hard to read. We're going to do something similar but in 1D.
Input will be a sequence of (label, x-coordinate) pairs, and output will be the result of drawing each point and label, ... |
The task is the following:
Program the shortest fully functional program that checks, if an 8-bit value contains a consecutive sequence of 2 or more ones in its binary form.
If it does contain such a sequence, the output shall be 0. If not: 1.
Examples:
Input: 1
Output: 1
Input: 3
Output: 0
Input: 72
Output: 1
Input: 7... |
Output coordinates of the vertices of a cube. Then, output a list of twelve triangles that will cover the cube, each triangle being a list of three vertex-indexes, consistently oriented. Output must be an ASCII string of distinct decimal numbers. This golf has no input. Winner is the fewest characters, where the charac... |
Because of this, you need a better way of working out if a phrase is an acronym of a word. You also think it would be worthwhile to see if the phrase and word in question are recursive acronyms.
Your task:
Given a word and then a phrase separated by a line, output if the phrase is an acronym and then if it is a recursi... |
User quartata posted this challenge, but he neglected the fact that, for whatever reason, he's not able to play MIDI files on his computer.
Let's help him out by writing a full program that reads a song in RTTTL format from the standard input, prints the song name to the standard output and plays it (at the right speed... |
The Challenge
The game Light Up! is a simple puzzle game where the objective is to light up every cell in an n-by-n array with light bulbs. However, there are blocks in the way that will prevent light from traveling, and no lightbulb can be places such that another lightbulb shines light on it. Each light bulb has ligh... |
Given (by any means) two different natural numbers (of any reasonable size), output (by any means) the square of their sum as in the examples below:
Given 4 and 3, output:
12 12 12 12 9 9 9
12 12 12 12 9 9 9
12 12 12 12 9 9 9
16 16 16 16 12 12 12
16 16 16 16 12 12 12
16 16 16 16 12 12 12
16 16 16 16 12 12 12
... |
The Challenge
I always write my math assignments down in the same way. For example:
pg. 420: #25, 50-56, 90
pg. 26: #50-60 evens, 70-80 odds, 90-99 3s
pg. 69: #12, 16, 18, 37
But I need you to tell me the individual problem numbers. For example:
input:
pg. 420: #25, 50-56, 90
output:
25, 50, 51, 52, 53, 54, 55, 56, ... |
The challenge
Insert one string into another at a given index.
Given a string input in the format:
#:Pattern:Word
Where:
# is a positive integer marking the index
Pattern is the string (whose length is undefined) to insert
: is a delimiter
Word is the string to insert into.
Assume that a : will not be used in either... |
Monday Mini-Golf: A series of short code-golf questions, posted (hopefully!) every Monday.
Sometimes folks get tired of life's rules: "don't do this", "you can't do that", "we won't let you do this". It can seem really restricting at times! But every now and then, it's good to have a little fun, so let's write some cod... |
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 laboris nisi ut aliquip ex ea ... |
Create a routine to calculate the position of each unit of a clock with an arbitrary number of units (minutes, hours, half-days, days, years, parsecs, quarter-quells, etc), where each unit can be equally sub-divided into an arbitrary number of sub-units; after n base units have elapsed.
Basically, figure out what a cl... |
The partial sums of a list of integers [a1, a2, a3, ..., an] are
s1 = a1
s2 = a1 + a2
s3 = a1 + a2 + a3
...
sn = a1 + a2 + ... + an
We can then take the list of partial sums [s1, s2, s3, ..., sn] and compute its partial sums again to produce a new list, and so on.
Related: Iterated forward differences
Input:
A non-em... |
In this task, your goal is to write a program for generating hexdumps of files of arbitrary types.
Input
The input consists of a (relative or absolute) path to the file to be processed. It may be taken from STDIN, a function argument, or a command line argument.
Output
The output (which may be written to a separate pla... |
There is a variant of the well-known N-queens problem which involves queens and knights and is said to be "considerably more difficult" 1. The problem statement is as follows:
You must place an equal number of knights ♞ and queens ♛ on a chessboard
such that no piece attacks any other piece. What is the maximum numb... |
Computers are everywhere nowadays - in cars, trains, skateboards, even nuclear reactors. The possibility that your software will run in a time travelling device is just a matter of time. Can you deal with it? Can you at least detect it?
Your task:
Write a program that loops and keeps querying the system time, in order... |
Introduction
There comes a point in childhood when you think you've mastered adding and multiplying, then someone comes along and informs you that:
a * b + c = (a * b) + c != a * (b + c),
and that it wasn't as simple or linear a process as you were earlier taught. You learn that there exists something called the order ... |
Energy levels of electrons
Electrons are ordered into "shells". However, sometimes electrons get excited, for example by heat, and leave their shell to go to another! These electrons will go back at some point, but they cannot go back to their original shell without emitting energy in the form of radio waves.
For examp... |
Hopefully not duplicate, but I did not find one.
Challenge
The challenge is to write full program, which compiles (without errors), but, when executed, will not finish the execution till the end, because an error appears during the execution.
Rules
It has to be full program, which is compile-able or interpret-able in ... |
The city of Poughkeepsie celebrates Halloween every year. Geographically, the city is a rectangle that is 30 miles long and 45 miles wide. On a map, it looks like a grid, with its east-west roads horizontally dividing the city into 1-mile-long rectangles and its north-south roads vertically dividing the city likewise. ... |
Task
Find the set of numbers such that the binary representation contains two or more runs of 1 separated by at least one 0.
For example, the for the numbers that are 4 bits long:
0 0000 (no ones)
1 0001 (only one run)
2 0010 (only one run)
3 0011 (only one run)
4 0100 (only one ... |
A sturdy square (akin to a magic square) is an arrangement of the integers 1 to \$N^2\$ on an \$N\$ by \$N\$ grid such that every 2 by 2 subgrid has the same sum.
For example, for \$N = 3\$ one sturdy square is
1 5 3
9 8 7
4 2 6
because the four 2 by 2 subgrids
1 5
9 8
5 3
8 7
9 8
4 2
8 7
2 6
all sum to the same amoun... |
The order of operations, PEMDAS, is a basic rule in mathematics telling us which order operations should be performed:
"Parentheses, Exponents, Multiplication and Division, and Addition and Subtraction"
The problem is, PEMDAS is not very versatile! What if you wanted to do it in another order? We won't mess with the pa... |
To conjugate a verb in l'imparfait, one needs to perform the following steps:
Find the "stem" of the word; this is achieved by omitting the -ons from the nous-conjugated form of the word. For example, vivre is nous vivons; removing -ons from vivons yields viv-.
Take the stem and add an appropriate ending, according to... |
Introduction
In this challenge, your task is to implement a collection of simple functions that together form a usable mini-library for simple probability distributions.
To accommodate some of the more esoteric languages people like to use here, the following implementations are acceptable:
A code snippet defining a c... |
This challenge is to lift the spirits of our mod Alex A., who is usually wrong.
Suppose you have a friend named Alex who needs help with basic logic and math, specifically mathematical equivalence.
He gives you a list of equations of the form [variable] = [variable] where a [variable] is always a single uppercase lett... |
Craps is a fairly simple dice game often played in casinos. Even if you aren't a gambler (which I'm not), it's still a fairly interesting game. Here's the rules:
At the start of a game of Craps there's what is called the come-out round. The player rolls two d6s (six-sided die) and the two die rolls are added. If the re... |
OCTOBER 22 IS INTERNATIONAL CAPS LOCK DAY! UNFORTUNATELY, SOME DO NOT RECOGNIZE THE GLORY OF THE ALMIGHTY CAPS LOCK. THEY SAY IT SEEMS "OBNOXIOUS" OR "LIKE SHOUTING" OR SOME NONSENSE. IN ORDER TO CONFORM TO THESE OBVIOUSLY ILLOGICAL AND INANE COMPLAINTS, PLEASE WRITE ME A PROGRAM THAT TURNS NORMAL TEXT INTO "SENSIBLE" ... |
Background
The task is simple but every programmer has implemented it at least once. Stackoverflow has a lot of samples, but are they short enough to win?
Problem story
You're a grumpy programmer who was given the task of implementing file size input for the users. Since users don't use bytes everyone will just enter "... |
Challenge
Forsyth–Edwards Notation (FEN) is a standard notation for describing a particular board position of a chess game. Your challenge is to evaluate the score using the FEN string. This is an example of a FEN string:
5k2/ppp5/4P3/3R3p/6P1/1K2Nr2/PP3P2/8
Using this string, you can calculate the material score for ... |
The Challenge Mission
You are Jim, a CIA agent in charge of super secret spies around the world. However, your enemies, the Naissurs, are highly trained in computer intelligence, and they can hack into your super secret communication systems. To contact your super secret spies, you must encrypt each message with a 16-c... |
Cell Phone Keyboard Typing
This question was asked a while back, but was closed due to poor specs. So, I'm redoing it, with better specs. This question is related, but goes in the opposite direction.
Before T9 came around, in order to type a character in a text message, you had to press one of the number keys a number ... |
I absolutely hate the digit 1. So, I need your help to convert numbers to their "proper forms".
Numbers in proper form never have two 1s in a row. 101 is okay, but 110 is hideous.
To convert, simply skip all the improper numbers and count normally. For instance...
1 -> 1
2 -> 2
...
10 -> 10
11 -> 12
12 -> 13
...
108 ->... |
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... |
In the future when Time Travel (abbreviated as TT) will be common, coin tossing will become a serious mind-sport. To prepare for the future we create a competition for programs where time traveling will be really happening from the viewpoints of the entries.
The competition is a round-robin style King of the Hill consi... |
Your geologist buddy nearly kicked down your office door as he burst in, eyes wide in excitement, and asked you to come with him to a site he just discovered. On the way he explains that he thinks he literally just struck gold. Only problem is, it's buried deep underground in a cavern with a very unstable roof. It's to... |
Objective
Given a grid of numbers, fill in the inequalities.
Assumptions
The number of columns and rows in the grid are equal.
The maximum size of the grid is 12x12.
The grid only consists of integers 0-9.
The output may contain a trailing newline.
The input is exactly as written below, including spaces and newlines.
E... |
Given an input string only containing the characters A-Z, a-z, and spaces, remove all occurrences of the uppercase and lowercase versions of the first character of the string (if the first character is A remove all As and as, if the first character is (space) remove all spaces), and print the output.
Example cases:
T... |
Write a program in any language that reads input from stdin and outputs a slightly modified output to stdout. The program should borrow some characters from the input and output as large of a prefix as possible of *language-name* is awesome! followed by a newline and then what's left of the input.
The input does not ... |
I don't like numbers, but I do like the Fibonacci sequence. I'm sure we could work something out.
Please read one integer n from STDIN and output the nth Fibonacci number in base 26 (abcdefghijklmnopqrstuvwxyz instead of 0123456789) to STDOUT.
The first Fibonacci number is 0. The second one is 1. The nth fibonacci num... |
Write a program or function that takes in a nonempty list of mathematical inequalities that use the less than operator (<). Each line in the list will have the form
[variable] < [variable]
where a [variable] may be any nonempty string of lowercase a-z characters. As in normal math and programming, variables with the s... |
The cumulative sum of a vector is calculated by simply taking the sum of all previous elements. For instance:
vec = [1 1 1 -1 -1 -1 -1 -1 1 1 1 1 -1]
cum_vec = [1 2 3 2 1 0 -1 -2 -1 0 1 2 1]
Now, impose an upper and a lower limit, meaning that you stop increasing the cumulative sum if it's at the up... |
Substitute a string with itself
Your goal is to substitute a string with itself by replacing each character in the original string with the one before it, starting with the first character and wrapping around. Here are some examples to show what I mean:
1st example:
Input: program
Output: apgopra
How:
Program -> mrogr... |
For this challenge, we are writing the time in the following form: hh:mm:ss
Some examples:
12:34:08
06:05:30
23:59:00
The challenge is to output the time after an amount of hours, minutes and seconds have elapsed, with as starting time 00:00:00. You can compare this with a timer that started at 00:00:00.
Here is an e... |
Introduction
Help! I accidentally dropped my TI-84 calculator out my window (don't ask how) and it broke. I have a math test tomorrow and the only calculator I can find is one with these buttons:
7 8 9 +
4 5 6 -
1 2 3 *
0 = /
My math test is a review test on evaluating expressions. I need a program to take an expres... |
Back to the basics! You're in you comp sci class again, except wiser and golfier. You have the tools, you have the power… but do you have the skill? Probably.
Crash Course for the non-Computer Scientist (skip if you don't need it)
A string is symbolically represented by an arbitrary letter (usually, for our purposes, w... |
Let's parse some regex. Not quite the regex you are used to, but the formal regular expressions taught in courses on automata theory. Wikipedia knows what I'm talking about.
We have four operations. In order of priority, from highest to lowest:
Parenthesis. (a)
The contents of the parenthesis is a regular expression ... |
Given two points A and B, find the angle from line AO to line BO about point O where O is the origin ((0,0)). Additionally, the angle may be positive or negative depending on the positions of the points (see examples). Input will be points A and B, and may be given in any convenient form. Output will be the angle in de... |
Robbers' challenge thread is here.
Cops' challenge: Design a programming language that appears to be unusable for programming, but admits computation (or at least completion of the task) through some non-obvious mechanism.
You should design a simple programming language that reads code from an input file and then does ... |
See the cop thread for more information. Each answer to this question should crack an answer there. That is to say, it should be code to find the third-largest integer in the input when run in the interpreter given in that answer.
If you post a crack that turns out to be invalid, you should delete it and are ineligible... |
Dropsort, designed by David Morgan-Mar, is an example of a linear-time "sorting algorithm" that produces a list that is, in fact, sorted, but contains only some of the original elements. Any element that is not at least as large as the maximum of the elements preceding it is simply removed from the list and discarded.
... |
My fifth-grade daughter is learning about codes and ciphers. She has reached the point of decoding a ciphertext that has been encoded with the Caesar cipher where the offset is not provided in advance.
Without computers this can be time-consuming, especially for long blocks of text. Luckily, we do have computers, and l... |
Backstory:
You enjoy your new programming job at a mega-multi-corporation. However, you aren't allowed to browse the web since your computer only has a CLI. They also run sweeps of all employees' hard drives, so you can't simply download a large CLI web browser. You decide to make a simple textual browser that is as s... |
Challenge
Winter is fast approaching with many places receiving the first layers of snow for the 15/16 season, so why don't we break out the snow machines and code ourselves some snow?
Given a integer n via STDIN, output an ASCII representation Beta's snowflake (as described below) at level n.
Beta's Snowflake
The snow... |
The obstacle course
You are currently stuck in some kind of course and you have to escape. However, if you do not choose the fastest way then the exit will close in front of you. Your challenge is to find the fastest route in an obstacle course.
Input
Your input consists of a list with lists in it, a 2D grid containing... |
Monday Mini-Golf: A series of short code-golf challenges, posted (hopefully!) every Monday.
True story1: The other day, I was playing around on my tablet when I had the idea to visit the page I normally use on my PC for testing JavaScript. After the page loaded, I entered this simple program:
alert("Hello!")
I then pr... |
Some time after this incident…
There are some of us who are against this defiling order of jQuery. It is an unholy presence, of which must be exterminated. I therefore call on you, the loyal to The New Kingdom of Reformation, to create a program that will eliminate such resistance. All code must be validated and search... |
Or else he will huff and puff and blow your house down!
That was completely irrelevant. This challenge is actually about Huffman coding. The gist of it is the frequency of characters in a given text is utilized to make its representation shorter. In other words, let's say that our alphabet is a through z and space. Tha... |
Question
If you are currently on a cell with a value x, you can move to any
cell in the same row or column, provided it has a value y such that x >
y. This move is called a switch.
The input consists of:
two integers 0 < m,n < 50
an integer k indicating the number of switches allowed 0 < k < 20
an m by n grid ... |
The video game Transistor features a very interesting ability system. You collect 16 "Functions" which you can use in 16 different slots. What's interesting is that there are 3 types of slots and every Function behaves differently according to which slot you use it in:
There are 4 Passive Slots.
There are 4 Active Slo... |
Write a program that takes as its input a string that outputs a string with the following properties.
If a character in the string is an uppercase letter (ASCII 41-5A), then the character is replaced by a string containing every letter up to and including the original letter in upper case. For example, if the input st... |
Introduction
The challenge is a very interesting variant of the game racetrack and those two challenges:
To Vectory! – The Vector Racing Grand Prix
Program a Racing Car
Source of this challenge is here (in German): c't-Racetrack
This challenge is especially interesting (and different from the two abovementioned chall... |
Given a positive integer below 1000, display all possible rectangles with that area.
Task
Let's say the input is 20. We can make a rectangle 20×1, 10×2, or 5×4, so this is a valid output:
********************
**********
**********
*****
*****
*****
*****
Note that each possible rectangle appears exactly once.
The re... |
Create a program that find the latest 50 challenges with the code-golf-tag that have at least 20 answers. Then, extract the scores for each language in each of the challenges. If there are more than one answer using the same language, count all scores. Thereafter, take the top 20 most common languages and output a list... |
This challenge is inspired by this Oliver Sacks quote:
“At 11, I could say ‘I am sodium’ (Element 11), and now at 79, I am
gold.” ― Oliver Sacks
I want you you find numbers in a string and replace them with their corresponding elements' symbols. (1 is H, 2 is He, 3 is Li, etc.) There are a few rules to follow:
Sin... |
Write a program or function that takes in a positive integer N and recreates this pattern of circles scaled to fit an N×N pixel image:
This image is a valid output example for N = 946.
In case it's not clear, all the small light-blue circles have the same radius and are positioned in the four dark-blue circles in the ... |
Introduction
You are a biologist studying the movement patterns of bacteria.
Your research team has a bunch of them in a petri dish, and you are recording their activity.
Unfortunately, you are seriously underfunded, and can't afford a video camera, so you just take a picture of the dish at regular intervals.
Your task... |
Related
Exposition
After winning the SO raffle, you could have been on top the world, and you were! The raffle had been going on for a year, now, and you were one of a hundred programmers who were selected to enter into the SO stronghold. And finally, the wait is over. Today is the day you go to--[obfuscated text proce... |
Challenge
Given an element name, output its electron configuration.
Input
Your input will be the full name of each element (the range being from Hydrogen, 1, to Calcium, 20) with some exceptions - you should be able to account for the following inputs:
Natrium - This is sodium
Kalium - This is potassium
Note that inpu... |
Remove all repeating words from an inputted sentence.
Input will be something like cat dog cat dog bird dog Snake snake Snake and the output should be cat dog bird Snake snake. There will always be a single space separating words.
Output order must be the same as input. (Refer to the example)
You don't need to handle p... |
Note: as this question has been marked as a duplicate, I have accepted an answer. However, I will still check this question if users can find a shorter way of doing it, and accept that answer.
Given two numbers (which are multiples of 0.5) representing heads-percentage and tails-percentage from a series of coin-flippin... |
This is a graphical output challenge where the task is to give the shortest code per language.
Task
Your code should plot a single purple pixel (hex value #800080 or
rgb(128, 0, 128)), moving clockwise round a circle. It should take exactly 60 seconds to make a full journey round the circle and should continue indef... |
The scene is:
Peter is at the gym with his buddy Brian when Brian suddenly is in dire need of his inhaler. Brian manages to tell Peter the code to his combination lock before he collapses on the floor.
The moment Peter gets to Brian's locker and sees what the indicator is pointing at, Stewie ambushes him and sprays a f... |
Long-time lurker, first-time poster. So here goes.
In the Wikipedia page for quine, it says that "a quine is considered to be 'cheating' if it looks at its own source code." Your task is to make one of these "cheating quines" that reads its own source code.
This is code-golf, so the shortest code in bytes - in each lan... |
Note: this challenge involves downloading and sifting through HTML webpages. If your language cannot handle this you might not want to participate in this challenge.
Introduction
There are always discussions over in The Nineteenth Byte Chat about who leads the starboard. So, lets help everyone out and count the total a... |
First challenge!
What is an ambigram?
Ambigrams are word(s) that read the same word(s) or another word given a certain transformation and possibly stylistic alterations.
Example:
That's an example of a rotational ambigram; it reads the same word, even when flipped around.
The Challenge
You are to create a function, pr... |
Damn, that's a lot of carrots.
The Inspiration
The Task
You must create a program, that, in as many languages as possible, replaces every instance of ^ with a markdown formatted link (meaning that if I was to post it in an answer, it would automatically read it as an image and place the image instead of the words) ... |
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... |
Write a complete program that takes a boolean or non-negative integer input. It must:
Output its own source code if the input value is falsy
Output its own source code in reverse if the input value is truthy
Your program cannot be palindromic, nor can it read its own source code by any means.
This is code golf - shor... |
One of the most common standard tasks (especially when showcasing esoteric programming languages) is to implement a "cat program": read all of STDIN and print it to STDOUT. While this is named after the Unix shell utility cat it is of course much less powerful than the real thing, which is normally used to print (and c... |
Task
The user inputs a sentence - words only. Any input other than letters or spaces, including integers and punctuation, should throw an exception: "Sentence must only use letters".
The output has a pattern, where some
words are reversed and others words are normal.
The pattern starts as
a normal word, the next two ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.