Advertisement
193030

2017. A TL

Apr 23rd, 2020
786
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.31 KB | None | 0 0
  1. #include <fstream>
  2. using namespace std;
  3.  
  4.  
  5. ifstream cin ("a.txt");
  6. ofstream cout ("a.out");
  7. int main()
  8. {
  9.  
  10.  
  11. int x,y,z = 0;
  12.  
  13. while(1)
  14. {
  15.     cin >> x;
  16.     cin >> y;
  17.     cin >> z;
  18.     x = x >> z;
  19.     int mask = (1 << y ) - 1;
  20.     x = x ^ mask;
  21.     x = x & mask;
  22.     printf("%d \n",x);
  23. }
  24.  
  25. return 0;
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement