F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Product

Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 131072/131072 K (Java/Others)
Total Submission(s): 1479    Accepted Submission(s): 356


Problem Description
Given a number sequence ${A}_{1},{A}_{2}....{A}_{n}$,indicating $N=\prod_{i=1}^{n}{i}^{{A}_{i}}$.What is the product of all the divisors of N?
 

Input
There are multiple test cases.
First line of each case contains a single integer n.$(1\leq n\leq {10}^{5})$
Next line contains n integers ${A}_{1},{A}_{2}....{A}_{n}$,it's guaranteed not all ${A}_{i}=0$.$(0\leq {A}_{i}\leq {10}^{5})$.
It's guaranteed that $\sum n\leq 500000$.
 

Output
For each test case, please print the answer module ${10}^{9}+7$ in a line.
 

Sample Input
4 0 1 1 0 5 1 2 3 4 5
 

Sample Output
36 473272463
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-04-24 23:53:09, Gzip enabled