rosetta-stone Questions

9

Solved

Here's a pretty simple idea, in this pastebin I've posted some pair of numbers. These represent Nodes of a directed graph. The input to stdin will be of the form, (they'll be numbers, i'll be...
Yasukoyataghan asked 27/12, 2010 at 9:10

41

Solved

The Challenge The shortest code by character count that will output the Morris Number Sequence. The Morris Number Sequence, also known as the Look-and-say sequence is a sequence of numbers t...
Yolanda asked 11/10, 2010 at 17:25

14

Solved

The basics: Consider the following tetrominoes and empty playing field: 0123456789 I O Z T L S J [ ] [ ] # ## ## ### # ## # [ ] # ## ## # # ## # [ ] # ## ## [ ] # [ ] [==========] T...
Colenecoleopteran asked 4/10, 2010 at 19:18

6

Solved

Since this week noone has posted a code-golf challenge, I'll give it a try. I do it so you can do something other than playing with swords during those long compile cycles. The challenge: D...
Groningen asked 20/9, 2010 at 20:43

14

Solved

The Challenge Calculate the Date of the Greek Orthodox Easter (http://www.timeanddate.com/holidays/us/orthodox-easter-day) Sunday in a given Year (1900-2100) using the least amount of charac...
Greenfield asked 27/8, 2010 at 12:53

33

Solved

It's Sunday, time for a round of code golf! Challenge Write the shortest source code by character count to determine if an input number is a "happy prime", "sad prime", "happy non-prime", o...
Choler asked 22/8, 2010 at 22:58

7

Solved

The goal Today's Code Golf challenge is to create a regex parser in as few characters as possible. The syntax No, I'm not asking you to match Perl-style regular expressions. There's alread...
Witchcraft asked 19/8, 2010 at 15:22

24

Solved

The Challenge: Write the shortest program that implements John H. Conway's Game of Life cellular automaton. [link] EDIT: After about a week of competition, I have selected a victor: pdehaan,...

9

Solved

Write the shortest program that calculates the Frobenius number for a given set of positive numbers. The Frobenius number is the largest number that cannot be written as a sum of positive mul...
Rainarainah asked 12/8, 2010 at 7:2

40

Solved

I recently pointed a student doing work experience to an article about dumping a multiplication table to the console. It used a nested for loop and multiplied the step value of each. This lo...
Embarkation asked 5/8, 2010 at 7:52

12

Solved

Challenge The shortest program by character count that accepts standard input of the form X-Y R, with the following guarantees: R is a non-negative decimal number less than or equal to 8 X...
Strangles asked 29/7, 2010 at 17:48

6

Solved

I love challenges like this, I'll hopefully submit my answer soon. Which player has the best 7 card hand? Given an unordered list of 9 cards (separated by a space), work out which player ha...
Magulac asked 29/7, 2010 at 16:34

14

The challenge is to create an algorithm for generating a specifically-sized subset of numbers in a sequence based on the current position in that sequence. While navigating through the many ...
Jeter asked 29/7, 2010 at 3:18

30

Solved

The puzzle A little puzzle I heard while I was in high school went something like this... The questioner would ask me to give him a number; On hearing the number, the questioner would do s...
Bouchier asked 12/7, 2010 at 18:11

15

Challenge: Take a sentence of input of any length and convert all the words in that sentence to pig latin. If you do not know what pig latin is please read Wikipedia: Pig Latin. Specification...
Orbicular asked 6/7, 2010 at 23:25

4

Solved

The Challenge Reach the end of the level! Bonus points if you hit each of the (C)oin blocks exactly 2 times. Disallowed Hard coding the command sequence in any way. Your favorite "One...
Connelley asked 4/7, 2010 at 1:28

7

(Thanks to greg0ire below for helping with key concepts) The challenge: Build a program that finds all substrings and "tags" them with color attributes (effectively highlighting them in XML)...
Diallage asked 3/7, 2010 at 12:58

7

Solved

Code Golf: Rotating Maze Make a program that takes in a file consisting of a maze. The maze has walls given by #. The maze must include a single ball, given by a o and any number of holes gi...
Herminiahermione asked 13/6, 2010 at 23:41

10

Solved

The Challenge The shortest code by character count that takes a single input integer N (N >= 3) and returns an array of indices that when iterated would traverse an NxN matrix according to t...
Winni asked 11/6, 2010 at 19:20

14

Solved

When thanking someone, you don't want to just send them an e-mail saying "Thanks!", you want to have something FLASHY: Input: THANKS!! Output: TTT H H AAA N N K K SSS !!! !!! T H H A A NNN...
Pervious asked 6/6, 2010 at 19:12

13

Solved

The challenge The shortest code by character count to output a a pattern of diamonds according to the input. The input is composed of 3 positive numbers representing the size of the diamond...
Jaggy asked 6/6, 2010 at 5:2

9

Solved

Guidelines for code-golf on SO We've all seen phone numbers that are put into words: 1-800-BUY-MORE, etc. What is the shortest amount of code you can write that will produce all the possib...
Vanegas asked 3/6, 2010 at 20:54

17

Solved

Recently, I used my favorite image editor to make a 1x1 black pixel (which can come in handy when you want to draw solid boxes in HTML cheaply). Even though I made it a monochrome PNG, it cam...

15

Solved

Last year (2009), the Google Code Jam featured an interesting problem as the first problem in Round 1B: Decision Tree As the problem seemed tailored for Lisp-like languages, we spontaneously...
Rodrigorodrigue asked 23/5, 2010 at 14:36

10

Solved

The challenge The shortest code by character count to draw an ASCII representation of a Code 39 bar code. Wikipedia article about Code 39: http://en.wikipedia.org/wiki/Code_39 Input The i...
Traditionalism asked 10/5, 2010 at 2:54

© 2022 - 2024 — McMap. All rights reserved.