New We are sorting MAX channels into categories and territories. Read the news

НАЙДИТЕ ОШИБКУ В РЕШЕНИИ



Задание 2.

Условие: Одна куча. Ходы: +1, +2, ×2. Победа при ≥45 камнях.

Код с ошибкой:
moves = [game(h+1), game(h+2), game(h*2)]
petya_win = [i for i in moves if i <= 0]
if petya_win:
return -max(petya_win)
else:
return -max(moves)
Views: 101
Open in MAX Report an inaccuracy

Report an inaccuracy

Describe what needs fixing. If you have a source, add a link.

You are leaving datool.ru

The link leads to an external website. datool.ru is not responsible for its content — check the address before entering passwords or payment details.

Redirecting in 10 s

Go