Ładowanie zadania…
A secret handshake can be encoded as a number, where each enabled bit adds one action. The function commands receives number and returns the list of actions it represents. Bits 1, 2, 4, and 8 add wink, double blink, close your eyes, and jump; bit 16 reverses the order of the commands.
1["wink"]2["double blink"]4["close your eyes"]def commands(number: int) -> list[str]:
Zaloguj się, aby zobaczyć historię rozwiązań
Zaloguj sięZaloguj się, aby korzystać z Mentora AI
Zaloguj sięThey run when you press "Submit" — your whole solution is checked against them so you can't hard-code answers for the visible cases.