Akash's Girlfriend
Practice
4.5 (12 votes)
Algorithms
Combinatorics
Math
Medium
Open
Problem
26% Success 1887 Attempts 30 Points 1s Time Limit 256MB Memory 1024 KB Max Code

Akash singh is a student of Mathematics at Geekland University. These days he is busy with his girlfriend Jassi. On the other hand, Jassi don't like mathematics that much. One day, Jassi decided to find all the strings of length N (comprising only of characters from '0' to '9') having odd number of 0's. For Example: 103,012,000 are all strings of length 3 having Odd number of 0's. She asked Akash to find number of such strings of for a given length of string modulus 1000000009 (10^9 + 9). Akash being busy in organizing college fest asks for your help. Help Akash impressing his girlfriend.

Input:

First line of input contains an integer t(t<=10000) which is the number of test cases, then, t lines follow each containing an integer N <= 10^18

Output:

For each test case print single integer, the number of strings of length N comprising only of characters from '0' to '9'. Having odd number of zeroes.

Please login to use the editor

You need to be logged in to access the code editor

Loading...

Please wait while we load the editor

Loading...
Results
Custom Input
Run your code to see the output
Submissions
Please login to view your submissions
Similar Problems
Points:30
20 votes
Tags:
ApprovedCircuitsMathMediumNumber TheoryNumber theory