BlueBook

p100ex4 - Cross Country

Given a two digit code, decide if the code represents either:

Code Output
MG midget girls
MB midget boys
JG junior girls
JB junior boys
SG senior girls
SB senior boys

All codes are case sensitive, and will always be two letters long. Be sure to reject invalid codes by outputting "invalid code". Also, output what each code represents, as stated exactly.

Input

Input consists of two character code representing either one of the six categories described above.

Output

Ouput the full description of the code. If the code does not exist, output "invalid code".

Sample Input

JG

Sample Output

junior girls

All Submissions
Best Solutions


Point Value: 3
Time Limit: 2.00s
Memory Limit: 16M
Added: Oct 21, 2008

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

I tried this code on ideone.com and it works. As I submit it, I get 10/30!!!
[Edit: code removed by admin]

Hey Aryan,
You have 2 problems with your code.
No. 1: Your curly brackets are in the wrong places.
I wont give you any examples, that would be cheating.
Also, you made a small typo. Hint: Read the question!

you are not suppose to post your code here.
people who have solved the problem can look at your submission and help you.

Waiting for other submissions to finish...
it just says this

You were submitting during the contest so there were a lot of submissions being made to the grader which slows it down. It gets graded eventually it just takes a few minutes. Now that the contest's over it should be back to normal.

To me, it looks like a VERY easy question. Is there a catch?

No. BlueBook questions (those in the BlueBook category, and generally having problem codes of p\d+ex\d+), are exercises from an introductory CS textbook.

There may be a catch... still looks too easy