結果

問題 No.523 LED
ユーザー titiatitia
提出日時 2024-01-25 00:08:22
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 175 ms / 2,000 ms
コード長 477 bytes
コンパイル時間 291 ms
コンパイル使用メモリ 81,572 KB
実行使用メモリ 57,300 KB
最終ジャッジ日時 2024-01-25 00:08:27
合計ジャッジ時間 3,488 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,332 KB
testcase_01 AC 35 ms
53,332 KB
testcase_02 AC 39 ms
57,300 KB
testcase_03 AC 37 ms
53,332 KB
testcase_04 AC 36 ms
53,332 KB
testcase_05 AC 175 ms
57,300 KB
testcase_06 AC 36 ms
53,332 KB
testcase_07 AC 35 ms
53,332 KB
testcase_08 AC 36 ms
53,332 KB
testcase_09 AC 39 ms
57,300 KB
testcase_10 AC 37 ms
53,332 KB
testcase_11 AC 38 ms
57,300 KB
testcase_12 AC 39 ms
57,300 KB
testcase_13 AC 65 ms
57,300 KB
testcase_14 AC 38 ms
57,300 KB
testcase_15 AC 39 ms
57,300 KB
testcase_16 AC 39 ms
57,300 KB
testcase_17 AC 38 ms
57,300 KB
testcase_18 AC 175 ms
57,300 KB
testcase_19 AC 88 ms
57,300 KB
testcase_20 AC 102 ms
57,300 KB
testcase_21 AC 141 ms
57,300 KB
testcase_22 AC 155 ms
57,300 KB
testcase_23 AC 154 ms
57,300 KB
testcase_24 AC 41 ms
57,300 KB
権限があれば一括ダウンロードができます

ソースコード

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