Delhi's Odd Even

I’m getting wrong answer.

my code :

Hi
Your logic is wrong
Just read the question again
Specially the sum part u have done is wrong