#P10390. [蓝桥杯 2024 省 A] 因数计数
[蓝桥杯 2024 省 A] 因数计数
Problem Description
Xiaolan casually wrote down an array containing positive integers. He found that he can easily count how many ordered pairs satisfy that is a divisor of . Therefore, he defines an integer pair to be a “divisor” of another integer pair if and only if and are divisors of and , respectively. He wants to know how many ordered quadruples satisfy that is a divisor of , where are all distinct.
Input Format
The first line contains a positive integer .
The second line contains positive integers , separated by a single space.
Output Format
Output one line containing an integer representing the answer.
5
3 6 2 2 7
4
Hint
Quadruple : is a divisor of .
Quadruple : is a divisor of .
Quadruple : is a divisor of .
Quadruple : is a divisor of .
Constraints:
For of the testdata, .
For of the testdata, .
For all testdata, and .
Input Format
Output Format
Translated by ChatGPT 5