BIGFIBB - Interesting determinant
Consider the following n×n matrix:
Calculate the determinant of such matrix given some n
Input
The first line of the input contains number t – the number of tests. Then t test descriptions follow. Each test consist of a single integer n.
Constraints
1 <= t <= 1000
1 <= n <= 1015
Output
For each test print the determinant of the matrix modulo 1000000007.
Example
Input: 3 1 2 3 Output: 1 2 3
hide comments
Amit Gupta:
2012-09-03 14:46:05
can you provide some big testcases for this? I'm getting WA, but I've tested on some numbers and the results seem ok to me.. |
|
abhijith reddy d:
2009-11-25 03:52:50
A Problem in Knuth Fundamental algorithms :) |
Added by: | Spooky |
Date: | 2009-11-24 |
Time limit: | 1s |
Source limit: | 50000B |
Memory limit: | 1536MB |
Cluster: | Cube (Intel G860) |
Languages: | All except: ASM64 NODEJS OBJC PERL6 SQLITE VB.NET |