結果

問題 No.2467 Sum of Product of Binomial Coefficients
ユーザー ntudantuda
提出日時 2023-09-23 10:39:23
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 413 ms / 2,000 ms
コード長 191 bytes
コンパイル時間 1,146 ms
コンパイル使用メモリ 87,056 KB
実行使用メモリ 77,440 KB
最終ジャッジ日時 2023-09-23 10:39:28
合計ジャッジ時間 3,697 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
76,092 KB
testcase_01 AC 198 ms
76,028 KB
testcase_02 AC 220 ms
76,172 KB
testcase_03 AC 212 ms
76,276 KB
testcase_04 AC 217 ms
76,256 KB
testcase_05 AC 413 ms
77,404 KB
testcase_06 AC 173 ms
76,932 KB
testcase_07 AC 91 ms
76,764 KB
testcase_08 AC 191 ms
76,940 KB
testcase_09 AC 257 ms
77,440 KB
testcase_10 AC 105 ms
75,880 KB
権限があれば一括ダウンロードができます

ソースコード

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