here is a link of my solution...
http://www.codechef.com/viewsolution/3651260
when i am running this code on ideone.com it is giving count of divisible number by k actual count + 1 ....means if ans is count =4 then it is giving count =5....so i hav submitted my solution printing count-1.....can anyone help to tell me how it is coming...thanks