Problem
https://www.acmicpc.net/problem/11050
Solution
math 모듈을 import 해서 해결했다.
code
1
2
3
4
5
6
7
8
import math
a = list(map(int,input().split()))
n = a[0]
k = a[1]
cal = math.factorial(n)/(math.factorial(n-k)*math.factorial(k))
print(int(cal))
https://www.acmicpc.net/problem/11050
math 모듈을 import 해서 해결했다.
1
2
3
4
5
6
7
8
import math
a = list(map(int,input().split()))
n = a[0]
k = a[1]
cal = math.factorial(n)/(math.factorial(n-k)*math.factorial(k))
print(int(cal))
A new version of content is available.