SRM 145 DIV 1 Correct Code