結果

問題 No.2467 Sum of Product of Binomial Coefficients
ユーザー lloyzlloyz
提出日時 2023-10-03 00:08:45
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 244 ms / 2,000 ms
コード長 225 bytes
コンパイル時間 305 ms
コンパイル使用メモリ 87,376 KB
実行使用メモリ 78,072 KB
最終ジャッジ日時 2023-10-03 00:08:48
合計ジャッジ時間 3,589 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
75,892 KB
testcase_01 AC 208 ms
76,080 KB
testcase_02 AC 229 ms
76,180 KB
testcase_03 AC 221 ms
76,288 KB
testcase_04 AC 226 ms
76,316 KB
testcase_05 AC 244 ms
78,072 KB
testcase_06 AC 157 ms
76,804 KB
testcase_07 AC 88 ms
76,948 KB
testcase_08 AC 196 ms
76,988 KB
testcase_09 AC 229 ms
77,656 KB
testcase_10 AC 111 ms
76,228 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

mod = 998244353
for _ in range(int(input())):
    n, k = map(int, input().split())
    ans = 0
    for i in range(k):
        ans += pow(i + 2, n, mod)
        ans %= mod
    print(ans)
0