DWITE '07 R3 #1 - Yet Another Primes Question

View as PDF

Submit solution

Points: 5
Time limit: 2.0s
Memory limit: 64M

Problem type
DWITE Online Computer Programming Contest, December 2007, Problem 1

Tony is busy writing his University exams, and lacks creativity. So he's making you write what you've already done in the last DWITE round, but differently. Instead of semiprimes, this time you're interested in numbers with 3 unique prime factors.

The input will contain five integers, one per line. 1 \le N \le 1000.

The output will contain five lines, stating if the supplied integers were valid or not.

Note: you're looking for unique factors. For example, 12 has three prime factors: 2, 2, 3. But it's only two unique numbers: 2 and 3. Thus 12 is not what is asked for.

Sample Input

10
12
15
30
105

Sample Output

not
not
not
valid
valid

Problem Resource: DWITE

Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported

Comments

There are no comments at the moment.