💡 반례를 잘 찾는 연습이 필요할 것 같다!!

T = int(input())
for _ in range(T):
n = int(input())
clothes = dict()
for i in range(n):
name, kind = input().split(' ')
clothes[kind] = clothes.get(kind, 0) + 1
num = list(clothes.values())
totalCase = 1
# 0을 포함해서 생각하기
for j in num:
totalCase *= (j+1)
print(totalCase-1)
풀이 방법
1. (각 종류별 의상 갯수)들의 곱 + n(각 의상만 입는 경우)(틀림)
2. (각 종류별 의상 갯수 + 1)들의 곱 - 1(모두가 아무것도 안입는 경우) (맞음)
n = 3
hat A
sunglasses = B
pant = C
=> 이런 경우에 1번으로 풀이하면 1x1x1 + 3로 4가 나오지만, 사실 답은 7이다.
=> 2번에 적용하면 2x2x2 -1 로 7에 맞게 나온다.