Help please for matrix exponentiation based GROWGOLD

My


[1] gives correct answers:

tax[7] = tax[3] * tax[4] * tax[5] * tax[6] = 3 * 4 * 8 * 16 = 1536
 
tax[8] = 4*8*16*1536 = 786,432
 
tax[9] = 8 * 16 * 1536 * 786,432 = 18811834

tax[10] = 16 * 1536 * 786,432 * 18,811,834 = 84,208,956

tax[11] = 1536 * 786432 * 18811834 * 84208956 = 35889352

tax[12] = 786432 * 18811834 * 84208956 * 35889352 = 75453662

tax[13] = 18811834 * 84208956 * 35889352 * 75453662 = 44609468


But still I am getting Wrong Answer :(

([ideone link][2].)


  [1]: http://www.codechef.com/viewsolution/1959063
  [2]: http://ideone.com/scwT0S

Please help! :frowning:
i am here to learn.