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.