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

The lastest Math theory problem

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


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
 

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 09:47:11, Gzip enabled