Chessboard Grains

In an old legend, one grain is placed on the first square of a chessboard, and each next square gets twice as many as the previous one. The function square receives a square number from 1 to 64 and returns how many grains are on that square. If the square number is outside this range, raise ValueError.

Примеры

Ввод
1
Вывод
1
Ввод
2
Вывод
2
Ввод
4
Вывод
8

Нужно реализовать

def square(number: int) -> int:

Теги

math
PostgreSQLv16

Тук ще се появи резултатът от изпълнението на кода

Tests5
Visible tests
Focus radio
Paused · SomaFM · Fluid