結果

問題 No.2467 Sum of Product of Binomial Coefficients
ユーザー ShirotsumeShirotsume
提出日時 2023-09-20 13:40:41
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 486 ms / 2,000 ms
コード長 224 bytes
コンパイル時間 370 ms
コンパイル使用メモリ 86,876 KB
実行使用メモリ 78,152 KB
最終ジャッジ日時 2023-09-20 13:40:46
合計ジャッジ時間 4,119 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 80 ms
75,580 KB
testcase_01 AC 231 ms
75,240 KB
testcase_02 AC 224 ms
75,532 KB
testcase_03 AC 217 ms
75,560 KB
testcase_04 AC 220 ms
75,824 KB
testcase_05 AC 486 ms
78,152 KB
testcase_06 AC 203 ms
77,652 KB
testcase_07 AC 117 ms
77,572 KB
testcase_08 AC 203 ms
75,880 KB
testcase_09 AC 290 ms
77,652 KB
testcase_10 AC 111 ms
75,568 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

def solve():
    mod = 998244353
    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)
    

for _ in range(int(input())):
    solve()
0