Code

#include<stdio.h>
int main(){
    int reg,pos;
    scanf("%d %d",&reg,&pos);
    if((reg>>pos)&1)
    printf("1");
    else
    printf("0");
    return 0;
}

Solving Approach

 

 

 

Upvote
Downvote
Loading...

Input

4 2

Expected Output

1