結果

問題 No.1310 量子アニーリング
ユーザー sotanishysotanishy
提出日時 2020-12-07 12:09:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 294 ms / 2,000 ms
コード長 153 bytes
コンパイル時間 322 ms
コンパイル使用メモリ 81,784 KB
実行使用メモリ 76,964 KB
最終ジャッジ日時 2023-10-17 16:27:06
合計ジャッジ時間 3,502 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,480 KB
testcase_01 AC 34 ms
53,480 KB
testcase_02 AC 35 ms
53,480 KB
testcase_03 AC 36 ms
53,480 KB
testcase_04 AC 35 ms
53,480 KB
testcase_05 AC 35 ms
53,480 KB
testcase_06 AC 35 ms
53,480 KB
testcase_07 AC 35 ms
53,480 KB
testcase_08 AC 36 ms
53,480 KB
testcase_09 AC 35 ms
53,480 KB
testcase_10 AC 36 ms
53,480 KB
testcase_11 AC 46 ms
59,732 KB
testcase_12 AC 58 ms
64,160 KB
testcase_13 AC 116 ms
73,024 KB
testcase_14 AC 149 ms
75,976 KB
testcase_15 AC 170 ms
76,128 KB
testcase_16 AC 176 ms
76,164 KB
testcase_17 AC 231 ms
76,536 KB
testcase_18 AC 291 ms
76,964 KB
testcase_19 AC 159 ms
76,144 KB
testcase_20 AC 96 ms
70,608 KB
testcase_21 AC 77 ms
68,436 KB
testcase_22 AC 294 ms
76,956 KB
testcase_23 AC 117 ms
73,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input());m=998244353;f=[1]*-~N
for i in range(N):f[i+1]=(N-i)*pow(i+1,m-2,m)*f[i]%m
print(sum(f[k]*pow(2,abs(N-2*k),m)for k in range(0,N+1,2))*2%m)
0