#659
Unrated
Cowlendar
시간 제한
2s
메모리 제한
1024MB
제출
0
정답
0
맞힌 사람
0
정답 비율
0.0%

문제

Bessie has woken up on a strange planet. In this planet, there are NN (1N1041\le N\le 10^4) months, with a1,,aNa_1, \ldots, a_N days, respectively (1ai41091\leq a_i \leq 4 \cdot 10^9, all aia_i are integers). In addition, on the planet, there are also weeks, where each week is LL days, with LL being a positive integer. Interestingly, Bessie knows the following: For the correct LL, each month is at least 44 weeks long. For the correct LL, there are at most 33 distinct values of aimodLa_i\bmod L.

Unfortunately, Bessie has forgotten what LL is! Help her by printing the sum of all possible values of LL.

Note that the large size of integers involved in this problem may require the use of 64-bit integer data types (e.g., a "long long" in C/C++).

입력

The first line contains a single integer NN. The second line contains NN space-separated integers, a1,,aNa_1, \ldots, a_N.

출력

A single integer, the sum of all possible values of LL.

예제 입력 1

12
31 28 31 30 31 30 31 31 30 31 30 31

예제 출력 1

28

예제 입력 2

4
31 35 28 29

예제 출력 2

23

점수

Inputs 3-4: 1ai1061 \leq a_i \leq 10^6Inputs 5-14: No additional constraints

코드 제출

코드를 제출하려면 로그인이 필요합니다.

로그인
내 제출
제출 내역이 없습니다.
맞은 사람
아직 맞은 사람이 없습니다.
난이도 투표
Unrated0명 투표
로그인 후 AC 받으면 투표할 수 있습니다.
전체 제출
제출 내역이 없습니다.