Not getting correct answer in SIMPSAT

Help me with my code
https://www.codechef.com/viewsolution/18986966

I think there is problem with the precision , i used double instead of float and your code got accepted.

your accepted code