結果

問題 No.786 京都大学の過去問
ユーザー ssmkzkssmkzk
提出日時 2019-03-18 17:46:08
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 17 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 306 ms
コンパイル使用メモリ 10,528 KB
実行使用メモリ 8,040 KB
最終ジャッジ日時 2023-09-25 15:41:24
合計ジャッジ時間 883 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,868 KB
testcase_01 AC 17 ms
8,040 KB
testcase_02 AC 16 ms
7,920 KB
testcase_03 AC 16 ms
7,904 KB
testcase_04 AC 16 ms
7,880 KB
権限があれば一括ダウンロードができます

ソースコード

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