传统题 3000ms 512MiB

Infinite Horizon

该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。

Description

Compute

$$\sum_{x=1}^m \sum_{i=1}^n \left( \left\lfloor\frac{a_i}{x}\right\rfloor + a_i \bmod x \right) $$

modulo 2322^{32}.

Format

Input Format

The first line contains two positive integers $n,m\,(1\le n\le 10^7, \max_i\{a_i\}\le m\le 10^{11})$.

The second line contains nn positive integers a1,a2,,an(1ai107)a_1,a_2,\ldots,a_n\,(1\le a_i\le 10^7).

Output Format

Output a single integer representing the result.

Samples

4 5
2 3 4 5
48
10 616
9 1 8 3 2 4 5 10 7 6
33672

Hello ACM 2026

未参加
状态
已结束
规则
ACM/ICPC
题目
13
开始于
2026-8-15 13:00
结束于
2026-8-15 18:00
持续时间
5 小时
主持人
参赛人数
31