Google Code Jam

All topics about coding, designing, etc. goes in here.
Post Reply
User avatar
Ron2K
Forum Technical Administrator
Posts: 9050
Joined: 04 Jul 2006, 16:45
Location: Upper Hutt, New Zealand
Contact:

Google Code Jam

Post by Ron2K »

http://code.google.com/codejam/

Basically, a coding contest. Click the link to find out more.
Kia kaha, Kia māia, Kia manawanui.
PHR33K
Registered User
Posts: 779
Joined: 05 Sep 2004, 02:00
Contact:

Post by PHR33K »

cool.
you entered?
SilverBack
Registered User
Posts: 1387
Joined: 26 Jan 2006, 02:00
Location: JHB
Contact:

Post by SilverBack »

I registered...but debating whethere Im actually gonna enter. Number programming problems drive me insane - get to irrate...so ja...will see :P

EDIT: HSF! The "practice" questions are intense...think Im gonna spectate :P Here is an example....hope this doesnt breach there rules or anything as you have to register to see the practice questions:
Problem

The decimal numeral system is composed of ten digits, which we represent as "0123456789" (the digits in a system are written from lowest to highest). Imagine you have discovered an alien numeral system composed of some number of digits, which may or may not be the same as those used in decimal. For example, if the alien numeral system were represented as "oF8", then the numbers one through ten would be (F, 8, Fo, FF, F8, 8o, 8F, 88, Foo, FoF). We would like to be able to work with numbers in arbitrary alien systems. More generally, we want to be able to convert an arbitrary number that's written in one alien system into a second alien system.

Input

The first line of input gives the number of cases, N. N test cases follow. Each case is a line formatted as
alien_number source_language target_language
Each language will be represented by a list of its digits, ordered from lowest to highest value. No digit will be repeated in any representation, all digits in the alien number will be present in the source language, and the first digit of the alien number will not be the lowest valued digit of the source language (in other words, the alien numbers have no leading zeroes). Each digit will either be a number 0-9, an uppercase or lowercase letter, or one of the following symbols !"#$%&'()*+,-./:;<=>?@[\]^_`{|}~

Output

For each test case, output one line containing "Case #x: " followed by the alien number translated from the source language to the target language.

Limits

1 ≤ N ≤ 100.

Small dataset

1 ≤ num digits in alien_number ≤ 4,
2 ≤ num digits in source_language ≤ 10,
2 ≤ num digits in target_language ≤ 10.

Large dataset

1 ≤ alien_number (in decimal) ≤ 1000000000,
2 ≤ num digits in source_language ≤ 94,
2 ≤ num digits in target_language ≤ 94.

Sample

Code: Select all

Input                                   Output  
4                                         Case #1: Foo
9 0123456789 oF8                Case #2: 9
Foo oF8 0123456789             Case #3: 10011
13 0123456789abcdef 01       Case #4: JAM!
CODE O!CDE? A?JM!.
Deja Moo: The feeling that you've heard this bull before.
Hire A Programmer -|- Just Source Code Blog
Post Reply