結果
| 問題 | 
                            No.2467 Sum of Product of Binomial Coefficients
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2024-03-20 15:52:55 | 
| 言語 | PyPy3  (7.3.15)  | 
                    
| 結果 | 
                             
                                AC
                                 
                             
                            
                         | 
                    
| 実行時間 | 385 ms / 2,000 ms | 
| コード長 | 417 bytes | 
| コンパイル時間 | 158 ms | 
| コンパイル使用メモリ | 82,692 KB | 
| 実行使用メモリ | 78,336 KB | 
| 最終ジャッジ日時 | 2024-09-30 06:06:45 | 
| 合計ジャッジ時間 | 3,112 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge4 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 1 | 
| other | AC * 10 | 
ソースコード
# 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()