#include <Google I/O.h>
Time limit5sMemory limit512 MB
Decode each block of eight I and O letters as one ASCII byte and print the message for every test case.
- Level
Easy2 of 10
- Topics
- Implementation, String, Bit manipulation
- Solved
- No attempts yet
Problem
The computer we use got so excited about the upcoming Google I/O that it started storing 1 and 0 as the capital letters I and O.
For example, the capital letter A is 65 in ASCII, so as a byte it should read 01000001, but this computer stores the same value as OIOOOOOI. Take a sequence of bytes written only with I and O and translate it back into text with ASCII.
Every byte is a printable character ( byte value ). The translated string has no space at its start or its end, but it may contain spaces inside.
Input
The first line contains the number of test cases . The test cases follow. Each test case starts with a line containing , the length of the string in bytes, and then a line with characters. Every character of that line is either I or O.
Limits
Output
For each test case, print one line in the form Case #x: y, where is the test case number and is the translated message. Test case numbers start at 1.