Why does this return 1

My doubt is solved. No need to reply anymore.

I think you have to use a single ampersand (&) to denote the bitwise operation of checking if the last bit is 1 => the number is odd

If you use double like && , it’s a normal logical operation where non zero numbers are 1 :slight_smile:

Oops, I just realised how stupid I am.

Happens to all of us :rofl:
However I had a doubt, on discuss your name is shown as “Rashmi Jain” while on your profile it’s “Aditya Jain”.
What magic is this XD

Codechef just being stupid. I literally have no clue🤷‍♂️
Maybe @admin can fix it?