Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <fstream>
- using namespace std;
- ifstream cin ("a.txt");
- ofstream cout ("a.out");
- int main()
- {
- int x,y,z = 0;
- while(1)
- {
- cin >> x;
- cin >> y;
- cin >> z;
- x = x >> z;
- int mask = (1 << y ) - 1;
- x = x ^ mask;
- x = x & mask;
- printf("%d \n",x);
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement