Running the program with the inputs is giving the correct answer but does not satisfy the conditions