Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ///Solutia 3
- #include <iostream>
- #include <cmath>
- #include <iomanip>
- using namespace std;
- int main()
- {
- long long n;
- long long bit;
- long long putere ;
- cin >> n >> bit;
- putere = pow(2,bit);
- if((n & putere) == 0)
- cout << n;
- else cout << n - putere;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement