当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

6760:Math is Simple

题目描述
Here is a simple math. You are given an integer n. Your task is to calculate the following:
输入解释
The first line contains an integer T (1≤T≤$10^4$), denoting the number of test cases. The only line of each test case contains an integer n (2≤n≤$10^8$).
输出解释
In fact, the answer can be represented as a fraction Q/P, where $gcd(P,Q)=1$ and P,Q>0. Since these numbers can be very huge for large n, you are only required to print $Q \cdot P^{-1}$ mod 998244353.

For each test case, print a single line with the calculated value.
输入样例
3
2
3
4
输出样例
499122177
1
831870295

提示
Real answer for sample test cases are 1/2,1,5/6 respectively.
来自杭电HDUOJ的附加信息
Recommend liuyiding

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-6760

最后修改于 2020-10-25T23:34:08+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
12000/6000MS(Java/Others) 524288/524288K(Java/Others)