UVa 10789 - Prime Frequency

Summary
Given a string find the characters a-z A-Z 1-9 that have a prime frequency in the string

Explanation
Generate a mapping of the ascii characters to their frequency. Use precomputed primes to figure out whether the frequency of the ascii character is a prime

Implementations

 * Code All the Problems

Input
4 ABCC AABBBBDDDDD AAaa11 ABCDFFFF

Output
Case 1: C Case 2: AD case 3: 1Aa Case 4: empty