mirror of https://github.com/jumpserver/jumpserver
feng
2 years ago
3 changed files with 10 additions and 9 deletions
@ -1,5 +1,4 @@ |
|||||||
def bit(x): |
def bit(x): |
||||||
if x == 0: |
if x < 1: |
||||||
return 0 |
raise ValueError("x must be greater than 1") |
||||||
else: |
|
||||||
return 2 ** (x - 1) |
return 2 ** (x - 1) |
||||||
|
Loading…
Reference in new issue