LoginSignup
0
0

More than 1 year has passed since last update.

ABC185 C - Duodecim Ferra を解いた

Posted at

abc185_1.png
abc185_2.png
abc185_3.png

0 から L までは、L-1 本の区切りを設けることが出来る。
その中から 11 本を選ぶ組み合わせを求めればよい。

abc185c.py
L = int(input())

num = L-12

if num == 0:
    print(1)
else:
    a,b = 1,1
    for i in range(L-1,L-12,-1):
        a *= i
    for j in range(11,0,-1):
        b *= j
    print(a//b)
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0