순열 추측하기(DFS, 파스칼 삼각형, 이항계수)분석 이항계수 리스트 선언 풀이 """ 가장 윗줄에 1부터 N까지의 숫자, 둘째 줄부터 위의 두개를 더한 값이 저장 N: 4, 가장윗줄: 3 1 2 4 3 1 2 4 4 3 6 7 9 16 N(1~10)과 가장 밑에 있는 숫자(F)가 주어져 있karla.tistory.com import itertools as itimport sysinput=sys.stdin.readlinen,f=map(int,input().split())visited=[False]*(n+1)p=[0]*n# 이항계수b=[1]*nfor i in range(1,n): b[i]=b[i-1]*(n-i)//i# 순열 구하기a=list(range(1,n+1))for tmp in it.permu..