1from secret import clue
2
3def lucky():
4 """
5 Izshani loshite.
6
7 Returns:
8 https://www.youtube.com/watch?v=GOcax2aLUtg
9 """
10
11 first_three_bits = clue(right_shift=5) << 5
12 last_three_bits = clue(left_shift=5) >> 5
13 middle_bits = clue(bw_and=0b00010000) | (clue(bw_or=0b11110111) ^ 0b11110111)
14
15 return first_three_bits | middle_bits | last_three_bits
.
----------------------------------------------------------------------
Ran 1 test in 0.004s
OK
t | 1 | from secret import clue | t | 1 | from secret import clue |
2 | 2 | ||||
3 | def lucky(): | 3 | def lucky(): | ||
4 | """ | 4 | """ | ||
5 | Izshani loshite. | 5 | Izshani loshite. | ||
6 | 6 | ||||
7 | Returns: | 7 | Returns: | ||
8 | https://www.youtube.com/watch?v=GOcax2aLUtg | 8 | https://www.youtube.com/watch?v=GOcax2aLUtg | ||
9 | """ | 9 | """ | ||
10 | 10 | ||||
11 | first_three_bits = clue(right_shift=5) << 5 | 11 | first_three_bits = clue(right_shift=5) << 5 | ||
12 | last_three_bits = clue(left_shift=5) >> 5 | 12 | last_three_bits = clue(left_shift=5) >> 5 | ||
13 | middle_bits = clue(bw_and=0b00010000) | (clue(bw_or=0b11110111) ^ 0b11110111) | 13 | middle_bits = clue(bw_and=0b00010000) | (clue(bw_or=0b11110111) ^ 0b11110111) | ||
14 | 14 | ||||
15 | return first_three_bits | middle_bits | last_three_bits | 15 | return first_three_bits | middle_bits | last_three_bits |
Legends | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|
|