Notice
Recent Posts
Recent Comments
Link
| 일 | 월 | 화 | 수 | 목 | 금 | 토 |
|---|---|---|---|---|---|---|
| 1 | 2 | 3 | ||||
| 4 | 5 | 6 | 7 | 8 | 9 | 10 |
| 11 | 12 | 13 | 14 | 15 | 16 | 17 |
| 18 | 19 | 20 | 21 | 22 | 23 | 24 |
| 25 | 26 | 27 | 28 | 29 | 30 | 31 |
Tags
- Programming
- 재귀
- C#
- w3school
- 문제풀이
- 기초
- Basic
- Unreal Engine 5
- Tutorial
- 백준
- guide
- Material
- UE5
- dfs
- W3Schools
- 프로그래밍
- Class
- dynamic
- Unity
- github
- 오류
- parameter
- DP
- Algorithm
- 파이썬
- c++
- loop
- 시작해요 언리얼 2022
- python
- String
Archives
- Today
- Total
목록11051 (1)
행복한 개구리
from math import factorial N, K = map(int, input().split()) print((factorial(N)//(factorial(K)*factorial(N-K))) % 10007) 이항계수를 구하여 바로 10007로 나누어줘도 정답처리가 됩니다. 하지만 문제 아랫쪽 알고리즘 분류에 다이나믹 프로그래밍이 있으니 dp를 사용해봅시다. N, K = map(int, input().split()) dp = [[0]for i in range(N+2)] dp[1].append(1) for i in range(2, N+2): for j in range(1, i+1): if j == 1: dp[i].append(1) elif j == i: dp[i].append(1) else: dp[..
Algorithm/BaekJoon
2022. 3. 20. 21:14