The first place team was from Centennial High School. The team members were John O'Rorke, Gunn Chang, Logan Kinde. The second place team was from Eagle High School. The team members were Chris Smith, Bart Robinson, Randy White. Both teams finished all three problems. The third team was from Boise High School. The team members were Mason Kinney, Kyle Schiepan, and Quincy Powell. Six teams finished at least one program correctly.
1 2 3 4 5 T H I S I S A C O D E D M E S S A G EThe characters are sent one column at a time from left to right as shown below.
TIC~AHSOMGI~DEESAES~~~DS~$A tilde represents a space (which implies that we cannot encode the tilde sign in our messages). The dollar sign indicates the end of the encoded message. Write a program that will decode any encoded message using the secret instructions.
Input: The program should read a message from the standard input. A message ends when you see the $ character. You may also assume that a encoded message has a maximum of 1000 characters.
Output: The program prints the decoded message.
Example:
Input: mm~paveetatee~hr~ntie ks.~n~~e~$ Output: meet me in the park at seven. Input: TIC~AHSOMGI~DEESAES.~~DS~$ Output: THIS IS A CODED MESSAGE. Input: Ibt~Ino'ehb~'~veeudtienrti~t~~e~dd!$ Output: I've been there but I didn't do it!
Input: Two numbers are given as input.
Output: Output the numbers that are prime palindromes (one per line).
Example: The following example shows the program being run five times with five different inputs.
Input: 1 200 Output: 1 2 3 5 7 11 101 131 151 181 191