結果

問題 No.523 LED
ユーザー titia
提出日時 2024-01-25 00:08:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 184 ms / 2,000 ms
コード長 477 bytes
コンパイル時間 200 ms
コンパイル使用メモリ 82,384 KB
実行使用メモリ 57,472 KB
最終ジャッジ日時 2024-09-28 07:12:14
合計ジャッジ時間 2,919 ms
ジャッジサーバーID
(参考情報)
judge2 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
sys.setrecursionlimit(10**7)
N=int(input())

mod=10**9+7
"""
from functools import lru_cache
@lru_cache(maxsize=None)
def calc(x,y):
    if x==y==0:
        return 1

    ANS=0

    if x>0:
        ANS+=x*calc(x-1,y+1)
    if y>0:
        ANS+=y*calc(x,y-1)

    return ANS%mod


for i in range(1,10):
    print(calc(i,0))
"""
# https://oeis.org/A000680


        
ANS=1
for i in range(1,2*N+1):
    ANS=ANS*i%mod

ANS=ANS*pow(pow(2,N,mod),mod-2,mod)%mod

print(ANS)
0