This website works better with JavaScript
Ana Sayfa
Keşfet
Yardım
Üye Ol
Giriş Yap
wolves
/
leetcode
şunun yansıması
https://git.wolves.top/wolves/leetcode.git
İzle
1
Yıldızla
0
Çatalla
0
Dosyalar
Sorunlar
0
Wiki
Ağaç:
e1e872380e
Dallar
Biçim İmleri
main
leetcode
/
26
/
02
/
693.go
693.go
90 B
Geçmiş
Ham
1
2
3
4
5
6
package A
func hasAlternatingBits(n int) bool {
n = n ^ (n >> 1)
return n&(n+1) == 0
}