Simple Math Problem
시간 제한1초메모리 제한2048 MB
주어진 m과 n에 대해 이항계수의 제곱과 또 다른 이항계수의 곱을 두 번 합산한 값을 998244353으로 나눈 나머지로 구한다.
문제
Given two positive integers and , determine the value of the following formula modulo :
Here, is a binomial coefficient (the number of ways to choose an unordered subset of items from a fixed set of items).
입력
The first line contains one integer () denoting the number of test cases.
For each test case, the input is a single line containing two integers and ().
출력
For each test case, output one line containing one integer: the value of the formula modulo .