Solve the logic problem of showing outcome and sample answers