Summing the K-N series

Problem Name:
Summing the K-N series
Site:HackerRank
Links:
Tags:
Problem setters: