instruction stringlengths 34 53.1k |
|---|
What general tips do you have for golfing in Octave? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Octave (e.g. "remove comments" is not an answer). Please post one tip per answer.
|
What general tips do you have for golfing in VBScript? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to VBScript. Please post one tip per answer.
Thanks to Marcog for the original idea. :)
|
Statement
The task is to synthesize sound (one note played) of some musical instrument (of your choice) using function in some general purpose programming language (of your choice).
There are two goals:
Quality of the resulting sound. It should resemble the real instrument as fine as possible;
Minimality. Keeping the ... |
What general tips do you have for golfing in AWK? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to AWK. Please post one tip per answer.
|
Given two rectangular arrays, A and B, let's say that A is embedded in B if A can be obtained from B by deleting some (or none) of the rows and columns of B.
Write a program with the following I/O:
Input: two arbitrary rectangular arrays of letters (a-z), as a string from stdin.
Output: the number of embeddings of t... |
The Task
Write a program to take a query from STDIN and then download the first 20 search results of that query from google and save them in a folder named Search as html files. Or if google points to a non-html file (like PDF), save whatever it is. Type of results may depend on the programmer, but the first 20 results... |
Algorithm for nesting submited jobs to reduce paper roll usage.
Working with a 36" large format printer, with paper roll as source (150feet=45meters).
With a delay loop on print server queue: waiting 30 seconds before printing in case another job are comming too.
At begining of (perl) print script, it do a list of pape... |
In this challenge, you will recieve a comma-separated list of weights as input, such as
1,3,4,7,8,11
And you must output the smallest amount of weights that can add to that set. For example, the output for this set would be
1,3,7
Because you could represent all of those weights with just those three:
1 = 1
3 ... |
This one is pretty simple.
Write the shortest program you can, while generating the most output.
To make it fun, programs that produce infinite output will be disqualified.
The winner is the program with the largest output size/code size ratio.
The results are based on what works on my computer, which is a Mac running ... |
Objectives: Output a String which contains every positive integer strictly below 1000.
The obvious answer would be to concatenate every one of them, and that would create a String of 2890 characters (thanks manatwork), to avoid this kind of easy answer, the length of the string must be under 1500 characters.
Here is a ... |
Any positive integer can be obtained by starting with 1 and applying a sequence of operations, each of which is either "multiply by 3" or "divide by 2, discarding any remainder".
Examples (writing f for *3 and g for /2):
4 = 1 *3 *3 /2 = 1 ffg
6 = 1 ffggf = 1 fffgg
21 = 1 fffgfgfgggf
Write a program with the followin... |
Given three integers rgb, output hexadecimal representation as a string.
Input: Output:
72 61 139 #483D8B
75 0 130 #4B0082
0 255 127 #00FF7F
Shortest most unorthodox code wins
|
Challenge
Write the shortest program that implements the minimum requirements for a linked list, stack and queue.
Minimum requirements
Functions that allow the user to add and remove elements from the linked list, stack and queue.
Any data type can be added to the linked list, stack and queue (string, int, etc.).
One ... |
Write the shortest code you can that produces an infinite output.
That's all. You code will only be disqualified if it stops producing output at some point. As always in code golf, the shortest code wins.
Here's a list of answers that I think are really clever, so they can get credit:
The comma is both code and data
I... |
Write a program which prints the sequence of prime numbers. The shortest solution wins!
All numbers must have a unary representation (not just in the output, but throughout the entire program). This could be a string of 1s, a list of 1s, Peano-style objects, etc.
No particular output format is required, as long as numb... |
Challenge: A cipher (which is a positive integer) which has any substring not divisible by 2, or has a substring divisible by 11 (other than 0), is defined as 'bad'. All other ciphers are defined as 'good'. Find the kth cipher, in ascending order, which is 'good'.
Input format
The first line of input has a single integ... |
The 24 Game is a card game. On each cards are four interger numbers. For a player, the goal is to use Addition, Subtraction, Multiplication and Division to end up with 24.
The goal of this code golf/puzzle is to write a program that, for four intergers, will state the one or multiple solutions possible with those numbe... |
Given an MxN grid of numbers, find the greatest product of a length 4 subsequence in any row, column, or diagonal. Subsequences cannot wrap around (e.g. 5 1 2 3 in the row 1 2 3 4 5).
I/O can be anything reasonable: files, stdin/stdout, copy+pasting expressions/arguments, variables. (If I'm missing any esoteric I/O opt... |
Multi palindromic numbers
Finding all number for which at least two** representation are palindromic, with more than one** characters, if in decimal, octal, hexadecimal, binary or in base64.
** have to be editable, see Variables below.
Edited: After lot of reflexion about comment from @DavidCarraher, I found an import... |
You have a French deck of cards that sorted like this: 2 - 10, Princes, Queens, Kings, Aces.
The deck represented with array of numbers from 1 to 52(included)
Now the dealer is shuffling the deck 3 times and inserting a Joker in a random position of the deck.
The joker represented with the number 0
The idea of shufflin... |
Given a number determine if it is a circular prime.
A circular prime is a prime where if you rotate the digits you still get prime numbers.
1193 is circular prime because 1931 and 9311 and 3119 are all primes.
Input: Output:
1193 circular
11939 circular
1456 nothing
193939 ... |
A Narcissistic Number is a number which is the sum of its own digits, each raised to the power of the number of digits.
For example, take \$153\$ (3 digits):
\$1^3 + 5^3 + 3^3 = 153\$
\$1634\$:
\$1^4 + 6^4 + 3^4 + 4^4 = 1634 = 1 + 1296 + 81 + 256 = 1634\$
The Challenge:
Your code must take input from the user and o... |
What general tips do you have for golfing in Bash? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Bash (e.g. "remove comments" is not an answer). Please post one tip per answer.
|
You are given a deck containing n cards. While holding the deck:
Take the top card off the deck and set it on the table
Take the next card off the top and put it on the bottom of the deck in your hand.
Continue steps 1 and 2 until all cards are on the table. This is a round.
Pick up the deck from the table and repea... |
Text may be translated to a written version of TUT language by replacing each letter by the corresponding "TUT word", as given in the following table (adapted from the linked article)*:
a e h hash o o u yu
b bub i ay p pup v vuv
c kut j jag q kwak w waks
d du... |
The problem is to compute nCr = n!/(r!) * (n-r)! in the fewest characters possible. The input will be in the form: 1st line will have number of test cases and second line will have n and r for each testcase. You need to print ncr
e.g.
Input
1
100 10
Output:
17310309456440
Here's what I have in python. Is there a way ... |
Slighty inspired by my previous challenge regarding Keith Numbers I want to propose a challenge to create a function that takes an integer and gives back a true or false depending on the number is a Reverse Keith number or not.
A reverse Keith uses the same little algorithm as Keith numbers, but ends up with it's start... |
In case the title was confusing, I mean something like the following C code:
main(){}znva(){}
When rot13 encoded, the code becomes
znva(){}main(){}
and still runs.
But that isn't a valid answer, because of these rules:
Your code must produce output. Code that doesn't produce output is disqualified.
The program can't... |
I'm a young wizard, and I try very hard to not waste mana during my magical encounters.
I have X spells available at any given time and each one of them have its own mana cost Y.
X,Y being positive integers strictly lower than 11.
As a beginner, my mana pool fluctuates a lot (it is always lower than 11), and I need hel... |
The functions receives 5 numbers, let's call them a, b, c, d and e
You must display two numbers.
First one is (((a + b) - c) * d) % e = f
Second one is (((a + b) - c) * d - f) / e
Input: Output:
7 5 9 3 8 1 1
1 2 3 4 5 0 0
19 25 9 7 11 3 22
21 12 99 3 13 -3 -15
21 12 99 3 -4 ... |
The twelve-balls problem is a famous problem where you are given twelve balls, one of which is a different weight, but you don't know whether it is heavier or lighter than the other balls. Using only three weighings of a two-sided scale, it is possible to find the differently weighted ball, and determine whether it is ... |
Write a complete program (not just a function) which using stdin takes in a string of arbitrary length (assume string-length at least one) composed only of digits 0-9 and outputs using stdout the substring which appears most often in the input string. The input string can be any length and the substring can be maximum ... |
I am not sure if this is possible. I have tried it and couldn't make it work at all, but I am being hopeful.
If this is not possible please flag this question and I will promptly delete it.
Conditions are simple,
Write code that will output same amount of character in the same shape as the code.
For example (A very stu... |
The challenge is to create a program that solves any one of the HQ9+ problems while looking like another language.
Note: This is not a golf challenge.
Rules:
The program must perform one of the following tasks when run.
Print "Hello, World!"
Print its entire source.
Print the lyrics to "99 Bottles of Beer on the Wall... |
Your program must print out the Gettysburg Address.
I copied this text from Wikipedia:
Four score and seven years ago our fathers brought forth on this continent a new nation, conceived in liberty, and dedicated to the proposition that all men are created equal.
Now we are engaged in a great civil war, testing wheth... |
Here's an example IRC log (this will be your program's input):
[01:00] == User [*****] has joined #Channel
[01:00] == ChanServ [ChanServ@services.] has left #Channel []
[01:00] == mode/#Channel [+o User] by ChanServ
[01:00] <Bot> Welcome, User!
[01:01] <User> Hello bot
[01:02] <Bot> Hi there
[01:38] <OtherUser> I like ... |
Constraints:
Calculate any notable irrational number such as pi, e, or sqrt(2) to as many decimal digits as possible. If using a number not mentioned in the list above, you must cite how and where this number is used.
The memory used to store data in variables that the program reads from at any time in its computation... |
Yet another compression challenge... but it could still be interesting...
Rules
Write a program that reads a string of printable ASCII characters, and outputs that string (or most of it) compressed in a tweet-sized message.
Write a program that reads the encoded message and outputs the original message (or most of it... |
Create a window that says hello world inside and nothing else. You can not have any ok or cancel buttons inside. It must be just a plain window that says hello world. I do not care about the contents of the window frame or how the window looks, but inside it must say hello world only.
Example:
Shortest code wins.
EDIT... |
One of the annoying bits about PowerShell, which helps amplify its disadvantage against other languages in code-golf, is that there are no symbolic comparison or logical operators.
A comparison that could be as short as this:
$x<10&&$x>5
Has to be:
$x-lt10-and$x-gt5
This bloats the code for even the simplest of compa... |
Write the shortest code to create a deadlock. Code execution must halt, so this doesn't work:
public class DeadlockFail extends Thread{ //Java code
public static void main(String[]a){
Thread t = new DeadlockFail();
t.start();
t.join();
}
//this part is an infinite loop; continues run... |
The class System.Globalization.EastAsianLunisolarCalendar of the mscorlib.dll assembly is non-nested public but its sole instance constructor is internal and it also declares some internal abstract members.
The problem: Write a C# class in your own assembly (code must compile with usual C# compiler) where a class deriv... |
Given an arbitrary contiguous range of positive integers, find the decomposition in the minimum number of sub-ranges of size L = 2^n, with the constraint that each range must be aligned, that is the first integer i in the sub-range must satisfy i = 0 (mod L).
Background: some (especially old) netblocks aren't a simple ... |
Seeing how hello world has backfired terribly, here is a harder one.
I love Zelda and I love ReBoot.
Create the following
Requirements:
It must be a window (can be ANY window even browsers and such).
The window can be of any size.
Window may not contain anything else except the picture.
Window should not close itself ... |
It's a three players game, play with one hand.
At same time, each player show his hand with 0 to 5 fingers extended.
If all player show same kind of (even or odd) number, there is no winner. But else, the player showing different kind the two other win.
P l a y e r s
A B C Winner
Even Even Even ... |
(Better known as 3D Tic Tac Toe; I just made up a name that sounded catchy ;-) )
Let two people play this game against each other.
Specifications:
Output
the easiest way of explaining this will be with an example:
+-+-+-+-+
|X| | | |
+-+-+-+-+
| |O| | |
+-+-+-+-+
| | | | |
+-+-+-+-+
|O| | | |
+-+-+-+-+
+-+-+-+-+
| |... |
Your challenge is generate a 5 pointed star like below. The star doesn't need to be filled.
Shortest code wins.
|
Your challenge is to convert a positive rational number into a finite simple continued fraction., in 2D, with horizontal fraction bars separating numerator from denominator. [A simple continued fraction only has numerators equal to 1.] Your solution should be able to represent a continued fraction with up to 8 terms.
... |
It's getting to be that time of year, and I figured I might as well post the first winter-themed question :)
Your challenge is to build a snowman.
How, you ask? Well, you decide! You can do ASCII art, you can animate it, you can golf the code, you can make the code that generates the snowman itself a snowman, you can g... |
In the spirit of the holidays, and as someone already started the winter theme(Build a snowman!) I propose a new challenge.
Print the number of days, hours, minutes, and seconds until Christmas(midnight(00:00:00) December 25th) on a stand alone window(not a console) in any unambiguous format you see fit, and continuall... |
The challenge is to take any real number as input and output or return the absolute value. You may not use any built-in functions other than those dealing with input and output/returning. This is code golf, so the shortest code wins. This is my first question here, so bear with me if I've left something obvious out of ... |
Inspired by The Most Useless Machine Ever.
Write the shortest program that does the following:
create a graphical window, then immediately close the window and exit the program.
do this in some visually apparent manner. Like the "arm" that pushes the switch in the machine, the program must use some visual method in th... |
The fifteen puzzle is peculiar in that only half the possible states of arrangement are solvable. If you flip the 14 and 15 tiles, there is no way you can slide the blocks so that they are flipped back.
Your task is to build a program that accepts a list of integers in the format of your choice (containing exactly one ... |
Given a specific date, have the code output a relative reference:
If the date entered is ahead of the current date, express as "x days from now" or "x weeks, y days from now", or "x years, y weeks, z days from now". Zero units need not be mentioned.
If the date is the current simply have it output "Today"
If the date ... |
An undecidable set is a set for which determining whether an object is an element of the set is an undecidable problem
Write a program which runs forever, printing the elements of any undecidable set, each element appearing on its own line. For any element in the set, there must be a finite amount of time after which ... |
The book Green Eggs and Ham by Dr. Seuss is famous for only having 50 different words in the entire story of the book.
Your task is to create a sequence of keystrokes that will result in the entire text of Green Eggs and Ham when applied to an empty file in the vim text editor, starting in normal mode with all default ... |
Upon receiving month and year in YYYYMM format, generate output of the corresponding calendar month for that year.
For example the input 201312 should generate the following output:
Mo Tu We Th Fr Sa Su
1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 29
30 31
Only... |
Write a program which takes the current time of the system clock, rounds to the nearest minute (you may choose how to round halves) and displays it formatted as the following:
A quarter past one in the morning.
A quarter to two in the afternoon.
Two o'clock in the afternoon.
Twenty-five minutes to three in the morning.... |
You cannot use if,while,for, ?:, ||, && etc., or recursion!
Assume it is Int.32
Shortest answer wins
|
Your challenge is to write a program which, given a year, outputs the number of "Friday 13ths" in it.
Rules & Details:
You can take input via STDIN, or as an argument passed to your program.
You should output the result to STDOUT.
You may assume that input will be a valid year, and does not pre-date the Gregorian cale... |
Take any type of nested list(s) containing numbers. Check for how many even/odd numbers are within and output even, same or odd (-1, 0, 1) in some way.
Example:
[[1,2,3],4,[5,6],[[7,8], 9]] => 5 odd > 4 even => odd or -1
[1,2,2,1,2,2,2] => 5 even > 2 odd => even or 1
[1,2,2,1] => 2 even ... |
This is a very stripped down version of A BlackJack KOTH contest...
This is the goal:
Upon the execution: There are two inputs, "H" to hit (have the code deal a card), "S" to stand (Stop getting cards, and let dealer try to win).
Coding Rules:
There is no betting or splitting of hands, for simplicity of the challenge.... |
Write the shortest program that generates a histogram (a graphical representation of the distribution of data).
Rules:
Must generate a histogram based on the character length of the words (punctuation included)
input into the program. (If a word is 4 letters long, the bar representing the number 4 increases by 1)
Must... |
This is a rather complex but very interesting maths subject (known as "covering problem"),
And I'd like your help for implementing it.
Imagine a lottery game, where each ticket must choose 5 random numbers in a set of 50 numbers (from 1 to 50).
It's quite easy to know the probability of a winning ticket, or the probabi... |
Challenge:
Write a a program to take an array of 24 4-letter strings, and output a compressed (lossless) representation of the array. You should also provide a program to decompress your representations.
Input:
The input will be comprised of 4 letter words using each of [G,T,A,C] exactly once (e.g. GTAC, ATGC, CATG, et... |
The truncated octahedron is a shape that has the interesting property that it can tessellate an entire 3D space so that any two solids that meet by an edge or corner also meet by a face, in a configuration called the bitruncated cubic honeycomb.
This gives it the special property that there is only one metric for adjac... |
Your challenge: Make a Christmas tree. The size must be choosable by some input method, but doesn't have to be directly related to any part of the tree; however, larger inputs should produce a larger tree.
How can you make it? You can make the tree any way you like, other than by printing the unicode character for the ... |
You bought a tasty Orange in the supermarket and got 78 cents change. How many possible ways the supermarket guy can give you the change using 1,5,10 or 25 coins
Input: Change amount
Output: The number of possible ways to give the change.
Order is not important 1,5 is same as 5,1
Win conditions:
Best performance
Sh... |
Note that this is not the same as Print the alphabet four times.
This task is to write a program to generate four copies of each letter of the English alphabet, one letter per line, on standard output:
A
A
A
A
B
B
B
B
etc.
The output should include newlines after each letter.
Lowercase letters and/or extra whitespace ... |
When I'm at a store and I pay for something in cash, I always try to give as exact change as possible in order to minimize the number of coins I have left in my wallet afterwards.
Your task is to build a program that will automate this process for me.
Your program will accept as input:
a line containing a single decim... |
When I was a kid, I played the Intellivision game Advanced Dungeons and Dragons: Treasure of Tarmin. The 3-D graphics put you in a first-person-perspective point of view with shocking realism:
But then I got a C-64. And I was able to draw on the 40x25 character grid by cursoring around the screen, setting the color ... |
The string 2123132133 has the property that no subsequence of length 3 is the same as any other subsequence of length 3.
Your task is to build a program that will output as long of a string as possible that satisfies this property for sequences of length 9 with the characters from 1 to 9.
The source code of your progra... |
The Stern-Brocot tree is a binary tree of fractions where each fraction is acquired by adding the numerators and denominators of the two fractions neighbouring it in the levels above.
It is generated by starting with 0/1 and 1/0 as "endpoint fractions", and from there, iterating by placing one fraction between each con... |
Your job is to write a program that determines if Goldbach's conjecture is true. The requirements are this:
If it is true: Print nothing. Run forever.
If it is false: Print the first counterexample. Halt.
Shortest code wins, but show why it works. Don't use any Prime built-in functions.
Edit: If you want, include ano... |
Overview
This is the XKCD tic-tac-toe cheetsheet:
It's rather big, I know. But it's also your most valuable resource in your challenge.
The challenge
Create a program (in your language of choice) that uses the Optimal Move Cheatsheet (henceforth OMC) to output the optimal move when given a sequence of moves.
The input... |
I present to you a test! Your test is to test. The test is to test the testee with tests a tester gives you, in the shortest amount of code. Specifically, you will give a multiple choice test that you have recieved as input.
In this challenge, you must take an input like this:
1. Our site is called Programming Puzzles ... |
Given a string, capitalize it. By capitalization I mean conTeNT-lENgth changes to Content-Length. In the example I showed the string with 2 words with - as the word boundary. However I expect you to write the code for the string containing any number of words separated by a single character as the boundary. This bounda... |
Let us define the Fibonacci sequence as
F(1) = 1
F(2) = 2
F(n) = F(n - 2) + F(n - 1)
So we have the infinite sequence 1,2,3,5,8,13,... It is well known that any positive integer can be written as a sum of some Fibonacci numbers. The only caveat is that this summation might not be unique. There is always at least on... |
Write a program that prints its own source code out backwards, in other words an eniuq.
Scoring:
+50 if you use pull data from the Internet.
+25 if you read your own source code.
+1 point per character
Lowest score wins.
Rules:
No using other files (e.g. reverse.txt)
Minimum code length is two characters.
Your prog... |
Create short source code in your favourite compiled language that compiles into a big (not less than 104857600 bytes) executable file. The program must be runnable (assuming 1GB of free memory) and can do anything (preferrable something simple like a hello world).
Usage of non-obvious tricks is encouraged.
Boring examp... |
I was reading Print your code backwards - reverse quine And I thought, this could be more interesting if your backwards code is also executable. So this challenge will have all the rules and requirements of the other, but must also be valid source once reversed (in the same or another language and still print its sourc... |
Write a program, in a language of your choice, that will compose a quine program of a requested size. The generated program may be in the same or a different language, if desired.
Programs are scored based on the following formula:
generating_program_length + smallest_supported_size + 512 * number_of_supported_sizes ^... |
In the language of your choice, write a program that is arranged in the shape of a Christmas tree that prints itself in the same shape.
What is not allowed:
Printing out the source file
Code that is nothing but statements that get echoed by an interpreter by virtue of them being literals (eg just using a tree-shaped t... |
This challenge is to write a program that prints a great famous speech.
Goals:
Obfuscated text (you should not be able to tell what speech it prints without running it)
Obfuscated code (it is more fun if you cant figure out how it works)
non-wrapping text and code is preferred. (78 chars/line)
Low score wins.
Rules:
... |
Another brilliant question from Stack Overflow turned into a code-golf challenge!
Write a program that:
Accepts a string as user input (not piped in or a command line argument). The data type of the input must be a string, if the language does auto evals on input, it must be cast to a string.
Finds the index (0 or 1 b... |
What general tips do you have for golfing in Befunge? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Befunge (e.g. "remove comments" is not an answer). Please post one tip per answer.
|
What general tips do you have for golfing in F#? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to F# (e.g. "remove comments" is not an answer). Please post one tip per answer.
|
Find Santa and his reindeer in a crowded scene.
Input
Input will be on STDIN and will be a variable number of lines of characters of equal, but variable, length.
If Santa (represented by the character S) is in the scene, his sack of presents (represented by the character P) will be in one of the positions adjacent to h... |
Deadfish is a joke "programming language" with four commands. Because the Esolang page is a bit contradictory and the interpreters on that page don't all work exactly the same, you should implement the following variation:
Specification
There is an accumulator which is at least 16 bits in size, more is allowed but le... |
Your program will be run an undetermined amount of times. On all but the last, there will be a file called data in the same directory of your program that has the same value each time. On the last run, the file will be there but will have different data in it. On all the times except the last, you can do whatever you w... |
Your task is to create a regular expression that matches most binary numbers with an even number of 0s and an odd number of 1s (e.g. "101100011").
The full criteria for the regex are:
matches 90% or more of all binary numbers between 0 and 11111111 with even number of 0s and an odd number of
1s,
doesn't match 90% or m... |
I just started reading about friendly numbers and I think they sound great.
In number theory, friendly numbers are two or more natural numbers with a common abundancy, the ratio between the sum of divisors of a number and the number itself. Two numbers with the same abundancy form a friendly pair; n numbers with the s... |
Your code just has to print "Happy 2013".
However, if it detects that it's 2014, it has to modify itself (as a running process!!) and print "Happy 2014" instead.
By self-modifying I mean the running process must really modify itself: it should alter its own instructions while it is executing.
Shortest code wins.
-10% s... |
Your program can do anything you want. The only condition is that it perform as expected if the date is before 2000, and fails spectacularly afterward. Define spectacularly however you'd like.
For all those people who missed the first Y2K, here's your chance!
Answer with highest score wins.
|
Suppose you're given some distinct uppercase letters scattered in a rectangular array of otherwise-blank cells. Each cell in the array belongs to the letter nearest to it, defined as the letter reachable in the smallest number of horizontal and/or vertical steps -- no diagonal steps. (If a cell is equidistant from two ... |
Write a program to determine if a number is a factorial. You should take the number from standard input.
Rules:
No using any loops (hint: recursion)
Maximum of one if statement
No accessing the Internet or external resources
Scoring:
+1 per character
-20 for each of the following: (I don't know if any of these are p... |
I'm a bit of a romantic, I love taking my wife out to see the sunrises and sunsets in the place we are located. For the sake of this exercise let's say I don't have code that can tell me the time of either sunset or sunrise for whatever date, latitude and longitude I would happen to be in.
Your task, coders, is to gene... |
The THX deep note is one of the most recognizable sounds in audio/video production technology. According to its creator, it took about 20,000 lines of C code to generate the final result. We can do better than that.
Your task is to write a script in any language that will generate a sound (to a file or directly to hard... |
Let n be any integer between 1 and 999,999 inclusive. Your challenge is to write a complete program which using stdin or command-line arguments takes in n and outputs the number of times the letter "o" is needed to write all cardinal numbers in standard American English between 1 and n. You can assume that n will alway... |
Note: This question was severely edited since I first posted it here. The rules were moved to here, read them before posting any answer to understand the purpose of this. This was the first question created in the code-trolling category.
Imagine a lazy user on Stack Overflow asks this question:
I need a program where ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.