Open ji-0630 opened 1 year ago
from itertools import combinations
def solution(number):
ans = 0
for i in combinations(number,3):
if sum(i) == 0:
ans += 1
return ans
from itertools import combinations
nums = [1,2,3,4] combi = list(combinations(nums, 2))
문제 설명