Plaese help me find the error in my code


my code

@be10046.19 you are not printing full stop at the end of sentences.

i have done that also but then also wrong answer

hi @be10046.19 so basically your code is not working for cases like
4
1 2 3 4
6

The correct answer is 2 and 4, but the program is printing 3 and 3. this is not possible because 3 occurs only once, so it cannot be used twice.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.