Getting WA in Make it divisible Can Anyone Please help me

I have been getting wrong answers on my problem Make it Divisible | CodeChef)
Can Anyone look at it and explain me whats really going wrong.Because the logic of my program seems to satisfy specificied in the question.
heres my codeā€¦ Solution: 51421039 | CodeChef
Thanks in AdvancešŸ˜Š

you can look at my solution

Consider the test input: