UVa 10924 - Prime Words

10924 - Prime Words

 * http://acm.uva.es/p/v109/10924.html

Summary
Sum up the value of a word by mapping it from $$[a-zA-Z] => ( 1, 2, 3, \ldots, 52 )$$, and then check if that sum is a prime number.

Explanation
The straightforward approach for checking primes is good enough for this problem.

Gotcha's

 * 1 is considered a prime in this problem, though it isn't normally.

Input
UFRN contest AcM a

Output
It is a prime word. It is not a prime word. It is not a prime word. It is a prime word.