์ง์๋ณํ
-
์ง์๋ณํ๊ณผ ๋ฌธ์์ด ์ธ๋ฑ์ค๋ฅผ ํตํ ์๊ณ ๋ฆฌ์ฆAlgorithm 2021. 6. 22. 14:15
์๋ ๋ฌธ์ ๋ ์ฝ๋๋ฆฌํฐ์์ ์ ๊ณตํ๋ Binary Gap์ ๋ฌธ์ ์ ๋๋ค๐ง๐ป๐ป ๋ฌธ์ ์ ์ A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary representation of N. For example, number 9 has binary representation 1001 and contains a binary gap of length 2. The number 529 has binary representation 1000010001 and contains two binary gaps: one of length 4 ..