correct ouput but code wrong .pls help

pls in this question https://www.codechef.com/problems/BUYING2
i did everything correct and i am getting correct ouput but still the code is wrong according to codechef .Can anyone tell me what’s my mistake?
My code is this https://www.codechef.com/viewsolution/19920059

  1. You are putting the wrong condition for t. t >=1 && t <= 20.

  2. You are not printing output on next line if s%x==0