結果
| 問題 |
No.523 LED
|
| ユーザー |
titia
|
| 提出日時 | 2024-01-25 00:08:06 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 477 bytes |
| コンパイル時間 | 290 ms |
| コンパイル使用メモリ | 12,416 KB |
| 実行使用メモリ | 17,568 KB |
| 最終ジャッジ日時 | 2024-09-28 07:12:11 |
| 合計ジャッジ時間 | 4,198 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 5 TLE * 1 -- * 19 |
ソースコード
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)
titia