11051

https://www.acmicpc.net/problem/11051초기코드n, k = map(int,input().split())def fun(n,k): if k==n or k==0: return 1 else: return fun(n-1,k-1)+fun(n-1,k)print(fun(n,k)%10007)시간초과난다재귀(메모이제이션)import sysn, k = map(int,input().split())sys.setrecursionlimit(10**7)cache = [[0]*1001 for _ in range(1001)]def fun(n,k): if cache[n][k]: # 0이 아닌 수라면 return cache[n][k] if k==n ..
계란소년
'11051' 태그의 글 목록