You are viewing a single comment's thread. Return to all comments →
c++
void max_possible_value(int n , int k) { int temp = 0; for (int i = 1; i < n; i++) { for (int j = (i+1); j <= n; j++) { int result = i&j; if((result > temp)&&(result < k)) { temp = result; } } } std::cout<< temp<<std::endl; }
Seems like cookies are disabled on this browser, please enable them to open this website
Day 29: Bitwise AND
You are viewing a single comment's thread. Return to all comments →
c++