結果

問題 No.2391 SAN 値チェック
ユーザー sotanishysotanishy
提出日時 2023-07-22 00:29:17
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 363 ms / 2,000 ms
コード長 237 bytes
コンパイル時間 1,587 ms
コンパイル使用メモリ 81,532 KB
実行使用メモリ 84,784 KB
最終ジャッジ日時 2023-10-22 00:21:48
合計ジャッジ時間 5,770 ms
ジャッジサーバーID
(参考情報)
judge10 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
53,332 KB
testcase_01 AC 37 ms
53,332 KB
testcase_02 AC 37 ms
53,332 KB
testcase_03 AC 293 ms
82,568 KB
testcase_04 AC 175 ms
79,100 KB
testcase_05 AC 256 ms
81,340 KB
testcase_06 AC 147 ms
78,152 KB
testcase_07 AC 148 ms
78,152 KB
testcase_08 AC 99 ms
71,452 KB
testcase_09 AC 138 ms
77,840 KB
testcase_10 AC 218 ms
80,364 KB
testcase_11 AC 61 ms
66,336 KB
testcase_12 AC 354 ms
84,204 KB
testcase_13 AC 362 ms
84,784 KB
testcase_14 AC 361 ms
84,516 KB
testcase_15 AC 362 ms
84,516 KB
testcase_16 AC 363 ms
84,784 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

mod = 998244353
N = int(input())
ans = [0] * (N+1)
f = 1
for i in range(N+1):
    ans[N-i] = (-1) ** i * pow(N-i, i, mod) * pow(f, mod-2, mod) % mod
    f = f * (i + 1) % mod

print(*ans, sep="\n")
0