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

建议使用的浏览器:

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

6175:Cube Summation

题目描述
Given an integer N, consider all multi-sets of positive integers such that their sum is N.
For example, if N =3, there are three possible multi-sets {1, 1, 1}, {1, 2}, {3}.
For each multi-set calculate the cube of its size and output the sum of all these values modulo 998244353.
输入解释
The first line of input contains an integer T (1<= T <=10000), the number of test cases.
Each test case contains a single integer N (1<= N<=100000).
输出解释
For each test case, output one line with a single integer, denoting the answer to the problem.
输入样例
4
1
2
3
100000
输出样例
1
9
36
513842114
提示
For the 1st case, the only possible multi-set is {1}. So the answer is 1^3=1.
For the 2nd case, there are 2 possible multi-sets. {1, 1}, {2}. So the answer is 2^3+1^3=9.
For the 3rd case, there are 3 possible multi-sets. {1, 1, 1}, {1, 2}, {3}. So the answer is 3^3+2^3+1^3=36.
来自杭电HDUOJ的附加信息
Recommend liuyiding

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

源链接: HDU-6175

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

共提交 0

通过率 --%
时间上限 内存上限
10000/5000MS(Java/Others) 153428/153428K(Java/Others)