#P10724. [GESP202406 七级] 区间乘积
[GESP202406 七级] 区间乘积
Background
Related multiple-choice and true/false questions: https://ti.luogu.com.cn/problemset/1155.
Problem Description
Xiao Yang has a sequence containing positive integers.
Xiao Yang wants to know how many pairs satisfy that is a perfect square.
A positive integer is a perfect square if and only if there exists a positive integer such that .
Input Format
The first line contains a positive integer , representing the number of positive integers.
The second line contains positive integers , representing the sequence .
Output Format
Output an integer, representing the number of pairs that meet the requirement.
5
3 2 4 3 2
2
Hint
Sample Explanation
The pairs that satisfy the condition are and .
Constraints
| Subtask ID | Percentage | ||
|---|---|---|---|
Translated by ChatGPT 5