Cumulative Reward with Temporal Decay - Coding problem | OneNoughtOne