結果

問題 No.2467 Sum of Product of Binomial Coefficients
ユーザー Navier_BoltzmannNavier_Boltzmann
提出日時 2024-03-20 15:52:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 440 ms / 2,000 ms
コード長 417 bytes
コンパイル時間 185 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 78,056 KB
最終ジャッジ日時 2024-03-20 15:52:59
合計ジャッジ時間 3,453 ms
ジャッジサーバーID
(参考情報)
judge11 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
64,312 KB
testcase_01 AC 173 ms
64,320 KB
testcase_02 AC 194 ms
64,320 KB
testcase_03 AC 186 ms
64,320 KB
testcase_04 AC 210 ms
64,320 KB
testcase_05 AC 440 ms
77,924 KB
testcase_06 AC 188 ms
77,928 KB
testcase_07 AC 102 ms
77,928 KB
testcase_08 AC 174 ms
66,764 KB
testcase_09 AC 298 ms
78,056 KB
testcase_10 AC 84 ms
64,320 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

# import pypyjit
# pypyjit.set_param("max_unroll_recursion=-1")
from collections import *
from functools import *
from itertools import *
from heapq import *
import sys, math,random,time
# input = sys.stdin.readline

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