CODECHEF: DevuLand, Dinosaurs and Laddus

http://www.codechef.com/OCT14/problems/PRLADDU