Company: Deloitte_1july
Difficulty: medium
You are given a list of integers, arr , with N elements, and a number X which specifies an interval. Your task is to write a program that calculates the sum of every X th element in the list starting from the first element. Read the input from STDIN and print the output to STDOUT. Do not write arbitrary strings anywhere in the program, as these contribute to the standard output, and test cases will fail. Constraints: i) 1 < N <= 1000 ii) 1 <= list elements <= 10000 iii) X < N Input Format: The first line of input contains an integer N, the size of the list arr. The second input line contains N numbers, each separated by a single white space. The third input line contains a number X which denotes the interval. Output Format: The first line of output contains the sum of every X th number in the given list arr. Sample Input 1: 4 1 2 3 4 2 Sample Output 1: 6 Explanation 1: Given N = 4, arr has the numbers 1, 2,3,4. The X=2, so every number in the interval of 2 has to be cons