Home STD Contest Notification Clarification Problems Ranklist Status Print Sign Out
比赛题目已经加到题库最后,欢迎继续AC~More...

The lastest Math theory problem

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 57    Accepted Submission(s): 7


Problem Description
There is a positive integer N,satisfied that (N / a1) equals K1a1, (N / a2) equals K2a2 and so on. Then, I want you to tell me the smallest N.
 

Input
Input is a integer n(1<=n<=6), then n numbers ai (16 < ai < 10000 )described above.
 

Output
If there exists such a N,output N mod 19880502, else -1 instead.
 

Sample Input
1 323 2 17 19
 

Sample Output
323 3493625
 

Author
WhereIsHeroFrom@HDU
 

Statistic | Submit | Clarifications | Back