Hello guys I'm new to Codechef please help!

when I compile my code it show successful but when I submit it, it show a word: WA
what is WA please tell me!

this is the submission link:
https://www.codechef.com/viewsolution/72425833

WA is short for Wrong Answer. Meaning there are no compilation errors, but the output is not correct.
If you link the submission you have a problem with, others may be able to help you better.

1 Like

Thank you dear termii,
Ok I will link it
https://www.codechef.com/viewsolution/72425833

1 Like

you are printing debug messages in the output.

sizeArray=int(input("please size of array"))
num=input("enter nums")

should be

sizeArray=int(input())
num=input()

This would make your code complete 2 of 3 Testcases.

Your code would not work for this one:
Input:

1
6
3 3 3 3 4 4

Expected Output:

NO

Your Output:

YES
2 Likes

Thank you termii you helped me alot,
I will do the recommended things you’ve told me.

1 Like

Hello dear termii, I have totally changed my algorithm and I tested it with lots of testcases,
can you let me know why it’s still not working?

https://www.codechef.com/viewsolution/72448952

I made it. it worked!