Question
문제링크
Silver 3
Logic
기본 구조 : recursion
1. nCm의 계산식은 다음과 같다.
( n! / ( m! X (n-m)! ) )
Code
from sys import stdin
def fact(n):
if n==0 : return 1
else : return n*fact(n-1)
n,m = map(int,stdin.readline().rstrip().split())
print(int(fact(n)//(fact(m)*fact(n-m))))