#C11340. Digit Product Prime Checker
Digit Product Prime Checker
Digit Product Prime Checker
Given a positive integer \( N \), calculate the product of its digits. Then, determine whether the resulting product is a prime number. A prime number is an integer greater than 1 that has no positive divisors other than 1 and itself.
If the product of the digits is a prime number, output 1
. Otherwise, output 0
.
Note: The product of the digits is computed by multiplying each individual digit of \( N \). For example, if \( N = 237 \), then the product is \(2 \times 3 \times 7 = 42\), and since 42 is not a prime number, the output should be 0
.
inputFormat
The input consists of a single line containing a positive integer \( N \) (\( 1 \leq N \leq 10^{18} \)).
outputFormat
Output a single integer: 1
if the product of the digits of \( N \) is a prime number, and 0
otherwise.
23
0