CF615D.Multipliers
普及+/提高
通过率:0%
时间限制:2.00s
内存限制:256MB
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
Ayrat has number n, represented as it's prime factorization p__i of size m, i.e. n = _p_1·_p_2·...·p__m. Ayrat got secret information that that the product of all divisors of n taken modulo 109 + 7 is the password to the secret data base. Now he wants to calculate this value.
阿亚拉特有一个数 n,它以质因数分解的形式给出:pi(长度为 m),即 n=p1⋅p2⋅…⋅pm。阿亚拉特获得了秘密信息:n 的所有正约数的乘积对 109+7 取模的结果,即是访问秘密数据库的密码。现在他希望计算该值。
输入格式
The first line of the input contains a single integer m (1 ≤ m ≤ 200 000) — the number of primes in factorization of n.
The second line contains m primes numbers p__i (2 ≤ p__i ≤ 200 000).
输入的第一行包含一个整数 m(1≤m≤200000)—— 表示 n 的质因数分解中质数的个数。
第二行包含 m 个质数 pi(2≤pi≤200000)。
输出格式
Print one integer — the product of all divisors of n modulo 109 + 7.
输出一个整数——$ n $ 的所有正因数的乘积对 $ 10^9 + 7 $ 取模的结果。
输入输出样例
输入#1
2 2 3
输出#1
36
输入#2
3 2 3 2
输出#2
1728
说明/提示
In the first sample n = 2·3 = 6. The divisors of 6 are 1, 2, 3 and 6, their product is equal to 1·2·3·6 = 36.
In the second sample 2·3·2 = 12. The divisors of 12 are 1, 2, 3, 4, 6 and 12. 1·2·3·4·6·12 = 1728.
第一个样例中,n=2⋅3=6。6 的所有正因数为 1,2,3 和 6,它们的乘积为 1⋅2⋅3⋅6=36。
第二个样例中,2⋅3⋅2=12。12 的所有正因数为 1,2,3,4,6 和 12,它们的乘积为 1⋅2⋅3⋅4⋅6⋅12=1728。
输入解题思路,AI测评打分。不知道怎么写?