시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
2 초 | 512 MB | 207 | 64 | 41 | 24.848% |
The musical band Be Geeks! got its name by no accident, as all the members are genuine math geeks. Among others, they love examining various properties of number sequences. Let’s see an example of their subject of interest.
The function gcd stands for the greatest common divisor of the given values. The greatest common divisor of a nonempty sequence of integers is the biggest integer which divides each integer in the sequence evenly.
The first line contains one integer N (1 ≤ N ≤ 2 · 105). The next line contains N integers a1, a2, . . . , aN (1 ≤ ai ≤ 109).
Print the value of F(A) modulo 1 000 000 007.
4 1 2 3 4
50
5 2 4 6 12 3
457
ICPC > Regionals > Europe > Central European Regional Contest > CERC 2019 B번