Query on codeforces

The answer is “Accepted” if I change ans%==0 to ans%2!=0
Won’t it be wrong ?

problem:- https://codeforces.com/problemset/problem/236/A

Attempt:-

hello @prerak_semwal

your implementation is not correct.

in line 10 -> go till i<strlen©
and then it should work

@aman212yadav
Noo…it’s giving wrong ans. on test 1
The last element is not needed to be checked as it will be certainly unique !!

yeah it will be unique and u have to add it in our count right?
which u r not doing.

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.