Re: [闲聊] 每日leetcode

楼主: DJYOMIYAHINA (通通打死)   2024-08-22 21:52:40
int findComplement(int num) {
int a = -1;
int b = num;
while(b>0) {
a <<= 1;
b >>= 1;
}
return num^(~a);
}
肥肥想了很久
现在连当easy守门员都有点问题了
:(
作者: RinNoKareshi (立石凛的男友)   2024-08-22 21:57:00
大师
作者: sustainer123 (caster)   2024-08-22 22:03:00
这题不难

Links booklink

Contact Us: admin [ a t ] ucptt.com