#29737: C++ solve


ryan980053@gmail.com (Ryan Yu)

學校 : Harvard University
編號 : 104670
來源 : [140.138.242.142]
最後登入時間 :
2021-04-13 12:00:33
a414. 位元運算之進位篇 -- c910335 | From: [140.138.242.142] | 發表日期 : 2022-03-28 12:05

unsigned int i = 0;
for(; i < 32; i++)
{
if(((n>>i)&1) == 0 )
break;
}
 
 
we use right shift operator to do so.
interesting fact that I TLE when I use cout/ cin rather than printf/ scanf...
 
ZeroJudge Forum