#GL0000214. Số hợp mạnh (Strongly Composite)
Bài tập thuộc lộ trình
Mục lục đề ⌄
Số hợp mạnh (Strongly Composite)
Số hợp mạnh (Strongly Composite)
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
An integer greater than one is strongly composite if it is composite and the number of its distinct prime divisors does not exceed the number of its composite divisors. The divisor is neither prime nor composite. Given integers , replace their product with a product of the maximum possible number of strongly composite integers . Output the maximum count, or if no factorization exists.
Input
The first line contains , followed by positive integers .
Output
Print the maximum possible count .
Subtasks
-
Subtask 1 (20 points): ; .
-
Subtask 2 (30 points): ; .
-
Subtask 3 (50 points): ; .
Examples
Example 1
Input
3
3 10 14
Output
2
Explanation
The product is 420=4*105; both 4 and 105 are strongly composite.
Example 2
Input
2
2 3
Output
0
Explanation
The product 6 has no strongly composite factorization.