Find sum of Modulo Power till Y
Given three positive integers X, Y, Z. Find (X0+X1+X2+X3+X4+.......................+Xy-1) % Z. Examples: Input: X = 4, Y = 5, Z = 6Output: 5Explanation: 40+41+42+43+44 = 1+4+16+64+256 = 341, 341%6 = 5, So 5 is the output Input: X = 20000, Y = 35000, Z = 2555Output: 791 Approach: This can be solved w