#C599. Good or Bad: Classify Number by Prime Digit Sum
Good or Bad: Classify Number by Prime Digit Sum
Good or Bad: Classify Number by Prime Digit Sum
You are given a single integer x. Your task is to classify the number as follows:
Compute the digit sum of x and check if it is a prime number. If the digit sum is prime, output Good
. Otherwise, output Bad
.
Recall that a prime number is an integer \( p > 1 \) that has no positive divisors other than 1 and itself.
Input/Output Format: Use standard input (stdin) and standard output (stdout) to interact with the program.
inputFormat
A single integer x is provided on a line from stdin.
outputFormat
Output a single line: "Good" if the sum of the digits of x is a prime number, and "Bad" otherwise.## sample
29
Good