Add solution for BUYING2

http://www.codechef.com/problems/BUYING2