add new solutions
This commit is contained in:
parent
ca24d0a56a
commit
0c73608ce5
36 changed files with 791 additions and 0 deletions
12
solutions/33/q3370/solution.go
Normal file
12
solutions/33/q3370/solution.go
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
package q3370
|
||||
|
||||
func smallestNumber(n int) int {
|
||||
i := 0
|
||||
for n > 0 {
|
||||
n >>= 1
|
||||
i++
|
||||
}
|
||||
return 1<<i - 1
|
||||
}
|
||||
|
||||
var _ = smallestNumber
|
||||
Loading…
Add table
Add a link
Reference in a new issue