Here is my C code for the problem: https://ideone.com/MgTYA8
The original problem is: http://www.spoj.com/problems/ADAHACK/
Please help…
Good day to you,
Firstly, your program takes “testCases” (which is not in description)
Secondly I guess such multiplication would overflow
Good Luck
~/Morass