class BinInsert {
public:
int binInsert(int n, int m, int j, int i) {
// write code here
// 插入位置 *** **
//1024 0100 0000 0000
//19 1 0011
//左移j位 100 1100 加法或者按位或运算
//------------------------------
//1100 0100 0100 1100
//本质:n加上m扩大2^j次方的结果作为返回值
m=m<<j;
return n+m;
// return n|m;
}
};
京公网安备 11010502036488号