Cube Summation

TimeLimit:5000MS  MemoryLimit:153428KB
64-bit integer IO format:%I64d
未提交 | 登录后收藏
Problem Description
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.
Input
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).
Output
For each test case, output one line with a single integer, denoting the answer to the problem.
SampleInput
4
1
2
3
100000
SampleOutput
1
9
36
513842114
 Hint 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.
Submit
题目统计信息详细
总AC数0
通过人数0
尝试人数0
总提交量0
AC率0.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: