python
2025-08-04 17:03:32
发布于:浙江
0阅读
0回复
0点赞
from itertools import combinations
n=int(input())
cnt=0
arr=list(map(int,input().split()))
cbs=combinations(arr,2)
for a,b in cbs:
if a+b in arr and a+b!=a and a+b!=b:
cnt+=1
print(cnt)
这里空空如也
有帮助,赞一个