結果

問題 No.786 京都大学の過去問
ユーザー ssmkzk
提出日時 2019-03-18 17:46:08
言語 Python3
(3.13.1 + numpy 2.2.1 + scipy 1.14.1)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 80 ms
コンパイル使用メモリ 12,544 KB
実行使用メモリ 10,752 KB
最終ジャッジ日時 2024-07-18 12:23:44
合計ジャッジ時間 721 ms
ジャッジサーバーID
(参考情報)
judge4 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

import math

N = int(input())

counttwo = N // 2

ans = 0

for i in range(counttwo + 1):
    ans += math.factorial(N-i) // (math.factorial(N - (i*2)) * math.factorial(i))

print(ans)
0