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

建议使用的浏览器:

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

5322:Hope

题目描述
Hope is a good thing, which can help you conquer obstacles in your life, just keep fighting, and solve the problem below.



In mathematics, the notion of permutation relates to the act of arranging all the members of a set into some sequence or order, or if the set is already ordered, rearranging (reordering) its elements, a process called permuting. These differ from combinations, which are selections of some members of a set where order is disregarded. For example, written as tuples, there are six permutations of the set {1,2,3}, namely: (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2), and (3,2,1). These are all the possible orderings of this three element set. As another example, an anagram of a word, all of whose letters are different, is a permutation of its letters. In this example, the letters are already ordered in the original word and the anagram is a reordering of the letters.
There is a permutation $A_{1}, A_{2}, ...A_{n}$, now we define its value as below:
For each $A_{i}$, if there exists a minimum $j$ satisfies $j>i$ and $A_{j}>A_{i}$ , then connect an edge between $A_{i}$ and $A_{j}$ , so after we connect all the edges, there is a graph G, calculate the product of the number of nodes in each component as an integer P. The permutation value is P * P.Now, Mr. Zstu wants to know the sum of all the permutation value of n. In case the answer is very big, please output the answer mod 998244353.
Just in case some of you can’t understand, all the permutations of 3 are
1 2 3
1 3 2
2 3 1
2 1 3
3 1 2
3 2 1
输入解释
There are multiple test cases.
There are no more than 10000 test cases.
Each test case is an integer n$(1 \leq n \leq 100000)$.
输出解释
For each test case, output the answer as described above.

输入样例
1
2
输出样例
1
5
来自杭电HDUOJ的附加信息
Author ZSTU
Recommend wange2014

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

源链接: HDU-5322

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

共提交 0

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