AtCoder Beginner Contest 185 C - Duodecim Ferra【Python】
https://atcoder.jp/contests/abc185/tasks/abc185_c
AtCoder ProblemsのRecommendationで Difficulty: 374、Solve Probability: 47%でした。
解けませんでした。解説を見てすぐ、なるほどとなれば良いのですが、現状は言われてみればそうかもというレベルです。
解説
https://atcoder.jp/contests/abc194/tasks/abc194_c/editorial
組み合わせを計算するコード
https://note.nkmk.me/python-math-factorial-permutations-combinations/
import math L = int(input()) def combinations_count(n, r): return math.factorial(n) // (math.factorial(n - r) * math.factorial(r)) print(combinations_count(L-1, 11))