#include
#include
#include
unsigned long zeroBits(unsigned long number, const std::vector& A) {
for (int bitPosition : A) {
number &= ~(1UL << bitPosition);
}
return number;
}
int main() {
unsigned long number = 255;
std::vector A = {3, 6, 0};
std::cout << "Original number: " << number << std::endl;
std::cout << "Binary representation: " << std::bitset<32>(number) << std::endl;
unsigned long result = zeroBits(number, A);
std::cout << "Number after zeroing bits: " << result << std::endl;
std::cout << "Binary representation: " << std::bitset<32>(result) << std::endl;
return 0;
}