FIBSUM - Sum of Fibonacci numbers

Given the ith (1<=i<=35) Fibonacci number Fi calculate the sum of the ith till i+9th number Fi+Fi+1+...+Fi+9 and the last digit of the i+246th one Fi+246.
Be careful: Your solution mustn't exceed 111 bytes. But rather half of it should be more than enough.
Score is source length.

Input

In the first line the number of testcases N<=100, then N lines with one positive integer i.

Output

One line with "Fi+Fi+1+...+Fi+9+last digit of Fi+246" for each i.

Example

Input:
2
1
35 Output: 146
1821381552

Added by:HWK
Date:2011-03-25
Time limit:1s
Source limit:111B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: SCM qobi

hide comments
2011-04-07 23:02:21 Piotr KÄ…kol
As I thought, Nabb reach the goal of 39 chars. ;-)
2011-04-06 12:08:39 HWK
@Shinichiro Hamaji: Very good! Your solution has potential for at least 39 bytes.
2011-04-03 20:08:45 Piotr KÄ…kol
Maybe Nabb will manage to beat Your record. :-)
2011-04-03 20:02:03 HWK
Now go for less than 40 bytes. ;-)
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.