結果

問題 No.790 ちきんの括弧並べ
ユーザー るさるさ
提出日時 2019-04-09 21:02:22
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
RE  
実行時間 -
コード長 315 bytes
コンパイル時間 386 ms
コンパイル使用メモリ 10,656 KB
実行使用メモリ 7,964 KB
最終ジャッジ日時 2023-09-18 08:25:51
合計ジャッジ時間 1,665 ms
ジャッジサーバーID
(参考情報)
judge12 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 RE -
testcase_01 WA -
testcase_02 RE -
testcase_03 WA -
testcase_04 RE -
testcase_05 WA -
testcase_06 RE -
testcase_07 WA -
testcase_08 WA -
testcase_09 RE -
testcase_10 WA -
testcase_11 RE -
testcase_12 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

n=int(input())
c={}
c[0]=1
for i in range(n):
    nc={}
    for j in c:
        if j>=0:
            if j+1 in nc:
                nc[j+1]+=c[j]
            else:
                nc[j+1]=c[j]
            if j-1 in nc:
                nc[j-1]+=c[j]
            else:
                nc[j-1]=c[j]
    c=nc
print(c[0])
0