結果

問題 No.2467 Sum of Product of Binomial Coefficients
ユーザー rlangevinrlangevin
提出日時 2023-10-12 00:36:12
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 246 ms / 2,000 ms
コード長 235 bytes
コンパイル時間 457 ms
コンパイル使用メモリ 87,360 KB
実行使用メモリ 78,092 KB
最終ジャッジ日時 2023-10-12 00:36:18
合計ジャッジ時間 4,074 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 89 ms
76,200 KB
testcase_01 AC 211 ms
76,148 KB
testcase_02 AC 235 ms
76,312 KB
testcase_03 AC 224 ms
76,352 KB
testcase_04 AC 229 ms
76,464 KB
testcase_05 AC 246 ms
78,092 KB
testcase_06 AC 160 ms
76,860 KB
testcase_07 AC 93 ms
76,928 KB
testcase_08 AC 205 ms
76,940 KB
testcase_09 AC 238 ms
77,632 KB
testcase_10 AC 117 ms
76,064 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

T = int(input())
mod = 998244353
for _ in range(T):
    N, K = map(int, input().split())
    ans = 0
    for k in range(1, K + 1):
        ans += pow(k+1, N, mod)
        ans %= mod
    print(ans)
0