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

建议使用的浏览器:

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

3658:How many words

题目描述
In order to make a new word, we will pick out m letters from all the upper case letters and lower case letters(from `a' to `Z'). Therefore, that means you can pick some same letters. But here are two rules:
● as to all the neighbour letters, the absolute value of their ASCII code must be not greater than 32.
● there must be at least one pair of neighbour letters whose absolute value of ASCII code is exactly equal to 32. For example, considering the word in the form like "Xx" or "xX", the neighbour letters have an absolute value of ASCII code exactly equal to 32.
Now how many di erent words can we get?
输入解释
The first line of input is the number of test case. For each test case, there is only one line contains one integer m(2 ≤ m ≤ 109).
输出解释
For each test case output one line, just the answer mod 1000000007.
输入样例
4
2
3
100
7926778
输出样例
52
4056
533550434
773908369
来自杭电HDUOJ的附加信息
Author windy7926778
Recommend lcy

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

源链接: HDU-3658

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

共提交 0

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