F. SRM Paper Analyst

3.2

16 votes
Easy
Problem

You have just joined the SRM HR Department. Your first task as described by your senior is to estimate the total number of papers used on a particular day. Since it is quite difficult to give actual number, you decided to give an approximate value. After discussing the problem with your senior you made the following notes as to make program more efficient :

  • On very first day of college after its establishment, there was only one paper used.
  • Each day the number of papers used gets double.
  • The above statement is true for all cases till the current day ( that is 10000th day ) and you are keeping it that way for the future also.

Based on the following information, Print the number of paper used on a particular day.

INPUT FORMAT :
First line of input will contain an integer N, denoting number inputs.
Following N lines will contain one integer D , denoting the day.

OUTPUT FORMAT :
Your output should contain N lines, each line denoting the number of papers used on the corresponding day D.

CONSTRAINTS :
1≤ N ≤102
1≤ D ≤1016

NOTE : Since answer could be large enough to be hold by any data-type print its modulo 1000000009 equivalent.

Sample Input
2
2
3
Sample Output
2
4
Time Limit: 1
Memory Limit: 256
Source Limit:
Explanation

Self-explanatory!

Editor Image

?