This website works better with JavaScript
Página Principal
Explorar
Ajuda
Registe-se
Iniciar Sessão
wolves
/
leetcode
mirror de
https://git.wolves.top/wolves/leetcode.git
Vigiar
1
Colocar Estrela
0
Fork
0
Ficheiros
Problemas
0
Wiki
Árvore:
645ba2ed3d
Ramos
Etiquetas
main
leetcode
/
26
/
02
/
693.go
693.go
90 B
Histórico
Em bruto
1
2
3
4
5
6
package A
func hasAlternatingBits(n int) bool {
n = n ^ (n >> 1)
return n&(n+1) == 0
}