Added basic input and loop function all hackerrank challenges use