https://www.acmicpc.net/problem/2775
def check(k,n): sum=0 if k==0: return n for i in range(1,n+1): sum+=check(k-1,i) return sum t=int(input()) for i in range(t): k=int(input()) n=int(input()) print( check(k,n))