結果

問題 No.2467 Sum of Product of Binomial Coefficients
ユーザー ntuda
提出日時 2023-09-23 10:39:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 368 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 240 ms
コンパイル使用メモリ 82,080 KB
実行使用メモリ 76,132 KB
最終ジャッジ日時 2024-07-16 10:10:30
合計ジャッジ時間 2,754 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 1
other AC * 10
権限があれば一括ダウンロードができます

ソースコード

diff #

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

0