Advertisement
Guest User

Untitled

a guest
Apr 22nd, 2019
73
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.32 KB | None | 0 0
  1. ///Solutia 3
  2.  
  3. #include <iostream>
  4. #include <cmath>
  5.  
  6.  
  7. #include <iomanip>
  8. using namespace std;
  9.  
  10. int main()
  11. {
  12. long long n;
  13. long long bit;
  14. long long putere ;
  15.  
  16. cin >> n >> bit;
  17.  
  18. putere = pow(2,bit);
  19. if((n & putere) == 0)
  20. cout << n;
  21. else cout << n - putere;
  22. return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement