code submitted in hackerearth