luogu#P3499. [POI2010] NAJ-Divine Divisor
[POI2010] NAJ-Divine Divisor
题目描述
An integer is given.
We say that an integer is a divisor of with multiplicity ( is integer) if and does not divide .
For example, the number has the following divisors:
2 with multiplicity 4, 3 with multiplicity 1, 4 with multiplicity 2, 6 with multiplicity 1, and so on.
We say that a number is a divine divisor of the number if is a divisor of with multiplicity and has no divisors with multiplicities greater than .
For example, the sole divine divisor of 48 is 2 (with multiplicity 4), and the divine divisors of 6 are: 2, 3 and 6 (each with multiplicity 1).
Your task is to determine the multiplicity of divine divisors of and the number of its divine divisors.
给定一个正整数 以及长度为 的正整数序列 ,同时给出 。你需要找出一个最大的 使得存在一个 , 并且 。求这个最大的 以及在 最大的情况下有多少个 满足条件。
输入格式
The number is given on the standard input, though in a somewhat unusual way.
The first line holds a single integer ().
The second line holds integers () separated by single spaces.
These denote that .
输出格式
The first line of the standard output should hold the maximum integer such that there exists a divisor of such that .
The second line should hold a single integer that is the number of (divine) divisors of with multiplicity .
3
4 3 4
4
1
提示
,且,有