Ad Infinitum - Math Programming Contest March'14 ---help

hackerrank.com currently organizing above mentioned contest…in this contest there are complex modulo related problems …maximum problem gives TLE…can any one tell how to solve these (modulo related) problems within time limit…or can suggest any book which can help me…or any other resource…
thanks…:slight_smile:
for example…
Tn = (n^K) x (R^n)

You have to find the Sum of the series Sn = T1 + T2 + T3 + …. + Tn

Find Sn % (10^9 + 7)
where
1 <= K <= 10^3
1 <= n <= 10^16
2 <= R <= 10^16

1 Like

google is the solution to everything…vague queries won’t help…search exactly what yr problem is

time limit is 2 seconds for each test case…thanks :slight_smile: