All submissions

Code

#include <stdio.h>

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

    // Toggle the 5th bit (bit position 5 means mask = 1 << 5)
    int result = N ^ (1 << 5);

    printf("%d\n", result);

    return 0;
}

Solving Approach

 

 

 

Loading...

Input

8

Expected Output

40