結果

問題 No.1310 量子アニーリング
ユーザー titiatitia
提出日時 2020-12-07 05:40:49
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 429 bytes
コンパイル時間 509 ms
コンパイル使用メモリ 81,792 KB
実行使用メモリ 105,136 KB
最終ジャッジ日時 2023-10-17 15:56:21
合計ジャッジ時間 3,476 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 67 ms
89,200 KB
testcase_01 AC 72 ms
89,200 KB
testcase_02 AC 67 ms
89,200 KB
testcase_03 WA -
testcase_04 WA -
testcase_05 AC 68 ms
89,200 KB
testcase_06 WA -
testcase_07 AC 67 ms
89,200 KB
testcase_08 AC 66 ms
89,200 KB
testcase_09 AC 67 ms
89,200 KB
testcase_10 WA -
testcase_11 AC 72 ms
91,792 KB
testcase_12 AC 78 ms
93,864 KB
testcase_13 AC 103 ms
98,816 KB
testcase_14 AC 117 ms
101,232 KB
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 157 ms
105,136 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 AC 94 ms
96,512 KB
testcase_21 AC 86 ms
94,212 KB
testcase_22 AC 180 ms
102,760 KB
testcase_23 AC 104 ms
98,832 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())

mod=998244353
FACT=[1]
for i in range(1,2*10**5+1):
    FACT.append(FACT[-1]*i%mod)

FACT_INV=[pow(FACT[-1],mod-2,mod)]
for i in range(2*10**5,0,-1):
    FACT_INV.append(FACT_INV[-1]*i%mod)

FACT_INV.reverse()

def Combi(a,b):
    if 0<=b<=a:
        return FACT[a]*FACT_INV[b]*FACT_INV[a-b]%mod
    else:
        return 0

ANS=0
for i in range(N+1):
    ANS=(ANS+Combi(N,i)*pow(2,abs(N-2*i),mod))%mod
print(ANS)
0