python的,求助大佬!!!
查看原帖
python的,求助大佬!!!
1231862
lzysxfcs楼主2024/5/1 12:09
n = int(input())
lst = list(map(int,input().split()))
lst.sort()
count = 0
for index,i in enumerate(lst):
    for ind,j in enumerate(lst[index+1:]):
        if i+j in lst[ind+1:] :
            count +=1
print(count)
2024/5/1 12:09
加载中...