자바 | 프로그래머스 | 타겟 넘버
https://programmers.co.kr/learn/courses/30/lessons/43165?language=java class Solution { static int answer; public int solution(int[] numbers, int target) { answer = 0; dfs(0, 0, 0, numbers.length, numbers, target); return answer; } void dfs(int cnt, int start, int res, int N, int[] numbers, int target){ if (cnt==N){ if (res==target){ answer++; } return; } for (int i=start; i
파이썬 | 백준 | 7453 | 합이 0인 네 정수
Solution. dictionary # 7453, 합이 0인 네 정수 import sys from collections import defaultdict A, B, C, D = [], [], [], [] N = int(sys.stdin.readline()) for i in range(N): a, b, c, d = map(int, sys.stdin.readline().split()) A.append(a) B.append(b) C.append(c) D.append(d) # abPlus = defaultdict(int) # for a in A: # for b in B: # abPlus[a+b] = abPlus[a+b]+1 # # count = 0 # for c in C: # for d in D: # coun..