DOUBLE STRINGS - WA

#include <stdio.h>

int main()
{
int t;
scanf("%d", &t);

while (t--)
{
    long int n;
    
    scanf("%ld", &n);
    
    if(n % 2 == 0)
    {
        printf("%ld\n", n);
    }
}

return 0;

}

your answer is correct when length of string is even but what about the string, of odd length(i.e 121) answer should be 2(i.e it can be modified to 11 so its length is 2)

2 Likes

ohh missed the point that the letters can be removed… damn me!! Thanks man

thats ok, be careful while reading questions read at least 2 times because more times you read more clarity you get in question. :slight_smile:

Yeah. I had to read several times because it seemed too simple. I was looking for the hidden trick. Then I had to sleep on it because my mind wouldn’t accept that it knew the answer.

//