I am having trouble understanding this question. Sorry the images are not quite clear, it's a snapshot from the PC. This question was asked previous year by a company which came to our college for recruitment.
The input example given are more like the multiple of 5. But I think there is more the question I am missing.
Thanks
UPDATE Don't know why images are not getting uploaded. Image 1, part 1 Image 1, part 2