結果

問題 No.44 DPなすごろく
ユーザー ntuda
提出日時 2023-12-25 22:13:48
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 39 ms / 5,000 ms
コード長 167 bytes
コンパイル時間 473 ms
コンパイル使用メモリ 82,100 KB
実行使用メモリ 54,372 KB
最終ジャッジ日時 2024-09-27 14:44:30
合計ジャッジ時間 2,227 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 20
権限があれば一括ダウンロードができます

ソースコード

diff #

from math import comb
N = int(input())
a = N % 2
ans = 0
for i in range(N // 2 + 1):
    n1 = a + 2 * i
    n2 = (N - n1) // 2
    ans += comb(n1 + n2, n1)
print(ans)
0