Type: Default 1000ms 512MiB

公约数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

nn 个数 a1,a2,,ana_1,a_2, \cdots,a_n 求有多少个数可以同时整除这 nn 个数。

输入格式

第一行一个整数 nn 。 第二行 nn 个用空格隔开的整数 a1,a2,,ana_1,a_2, \cdots , a_n

输出格式

一行一个数,表示公约数的数量。

样例输入

2
16 32

样例输出

5

样例解释:

共有五个数可以同时整除 161632321,2,4,8,161,2,4,8,16

数据规模与约定:

对于 30%30\% 的数据,0<n1000,1ai10000 < n ≤ 1000, 1 ≤ a_i ≤ 1000

对于 100%100\% 的数据,0<n100000,1ai10120 < n ≤ 100000, 1 ≤ ai ≤ 10^{12}

淄博实验中学NOIP2023赛前全真模拟1

Not Attended
Status
Done
Rule
OI
Problem
8
Start at
2023-10-25 14:00
End at
2023-10-25 21:40
Duration
7.7 hour(s)
Host
Partic.
11