Sum it up question-backtracking

why is my code giving wrong answers