Logo
(追記) (追記ここまで)

33244번 - Group Activities 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 2048 MB99655366.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} $.

제한

예제 입력 1

3
5
3
31

예제 출력 1

465

예제 입력 2

4
15
8
7
11

예제 출력 2

9240

힌트

출처

University > Delft University of Technology > Freshmen Programming Contest 2020 G번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /