Hide

Problem A
I Hate The Number Nine

/problems/nine/file/statement/en/img-0001.jpg

How many positive d digit numbers exist that do not contain a nine?

Input

The first line of the input consists of a single integer, T, the number of test cases.
Each of the following T cases consists of a single integer d, the number of digits.

  • 1T20

  • 1d1018

Output

For each test case, output the number of positive numbers with d digits that do not contain a nine. Since this number can be very large, output it modulo 1000000007.

Sample Input 1 Sample Output 1
3
1
2
100
8
72
343393926
Hide

Please log in to submit a solution to this problem

Log in