| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 1 초 | 2048 MB | 99 | 65 | 53 | 66.250% |
The lockdown is still in place, so organizing the yearly group excursion is a no-go. Instead, the study association is organizing the Fictional Programmer Convention (FPC): a digital event where programmers can meet other programmers while performing various digital activities. You are on the committee that is concerned with planning the events of the FPC. They give you the following task: determine how many programmers you want to invite.
The committee will plan different activities that will take place for all participants at the same time, with the participants divided into groups. Each activity requires an exact number of participants per group. For example, a variety of digital games are played in groups of 5, a pop quiz about programming history is played in teams of 3, and a workshop on clean coding practices is given in separate sessions of 31.
Because of a limited budget, you want to invite as few people as possible, but still at least one person of course. Can you determine the exact number of people you must invite to exactly fill each activity?
\item One line containing one integer $ 1 \leq n \leq 10^5 ,ドル the number of activities organized. \item For each of the $ n $ activities, one line with an integer $ 1 \leq i \leq 10^{18} $: this activity requires exactly $ i $ participants per group.
An integer indicating the smallest number of people $p$ you can invite, such that each activity can exactly fill a number of groups. It is guaranteed that $ 1 \leq p \leq 10^{18} $.
3 5 3 31
465
4 15 8 7 11
9240