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

建议使用的浏览器:

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

2576:Another Sum Problem

题目描述
FunnyAC likes mathematics very much. He thinks mathematics is very funny and beautiful.When he solved a math problem he would be very happy just like getting accepted in ACM.Recently, he find a very strange problem.Everyone know that the sum of sequence from 1 to n is n*(n + 1)/2. But now if we create a sequence which consists of the sum of sequence from 1 to n. The new sequence is 1, 1+ 2, 1+2+3, .... 1+2+...+n. Now the problem is that what is the sum of the sequence from1 to 1+2+...+n .Is it very simple? I think you can solve it. Good luck!
输入解释
The first line contain an integer T .Then T cases followed. Each case contain an integer n (1 <= n <= 10000000).
输出解释
For each case,output the sum of first n items in the new sequence. Because the sum is very larger, so output sum % 20090524.
输入样例
3
1
24
56
输出样例
1
2600
30856
来自杭电HDUOJ的附加信息
Recommend lcy

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

源链接: HDU-2576

最后修改于 2020-10-25T22:54:50+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 32768/32768K(Java/Others)