結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 35 ms
53,480 KB
testcase_01 AC 35 ms
53,480 KB
testcase_02 AC 35 ms
53,480 KB
testcase_03 AC 35 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 36 ms
53,480 KB
testcase_08 AC 36 ms
53,480 KB
testcase_09 AC 35 ms
53,480 KB
testcase_10 AC 35 ms
53,480 KB
testcase_11 AC 40 ms
59,512 KB
testcase_12 AC 53 ms
64,156 KB
testcase_13 AC 89 ms
68,680 KB
testcase_14 AC 105 ms
70,912 KB
testcase_15 AC 119 ms
73,116 KB
testcase_16 AC 123 ms
73,152 KB
testcase_17 AC 160 ms
76,552 KB
testcase_18 AC 195 ms
76,956 KB
testcase_19 AC 112 ms
70,988 KB
testcase_20 AC 78 ms
66,504 KB
testcase_21 AC 65 ms
66,380 KB
testcase_22 AC 197 ms
76,948 KB
testcase_23 AC 90 ms
68,688 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

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