Notice
Recent Posts
Recent Comments
Link
목록11050 (1)
just inside
![](http://i1.daumcdn.net/thumb/C150x150/?fname=https://blog.kakaocdn.net/dn/crT6S9/btsIAsAfaIS/xohk4oPRASWrzcES7I1NV0/img.png)
문제 링크https://www.acmicpc.net/problem/11050문제 설명자연수 \(N\)과 정수 \(K\)가 주어졌을 때 이항 계수 \(\binom{N}{K}\)를 구하는 프로그램을 작성하시오. 입력첫째 줄에 \(N\)과 \(K\)가 주어진다. (1 ≤ \(N\) ≤ 10, 0 ≤ \(K\) ≤ \(N\)) 출력\(\binom{N}{K}\)를 출력한다.제출 코드import sysinput = sys.stdin.readlinen, k = map(int, input().split())def factorial(n): if n == 0: return 1 return n * factorial(n-1) print(factorial(n) // (factorial(k) * fa..
coding test/구현
2024. 7. 16. 15:32