Problem1640--exam-shift-2

1640: exam-shift-2

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 107  Solved: 3
[Submit] [Status] [Web Board] [Creator:]

Description

returns x with the n bits that begin at position p inverted (i.e., 1 changed into 0 and vice versa), leaving the others unchanged. If n is great than p, then show

Input

x,p,n

Output

x with the n bits that begin at position p inverted (i.e., 1 changed into 0 and vice versa)

Sample Input Copy

13
4
2

Sample Output Copy

17

Source/Category

137