F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

How many words

Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 32768/32768 K (Java/Others)
Total Submission(s): 672    Accepted Submission(s): 464


Problem Description
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?
 

Input
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).
 

Output
For each test case output one line, just the answer mod 1000000007.
 

Sample Input
4 2 3 100 7926778
 

Sample Output
52 4056 533550434 773908369
 

Author
windy7926778
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-01 14:23:27, Gzip enabled