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
Accedi per vedere la cronologia degli invii
AccediAccedi per usare l'AI Mentor
AccediVisible tests
1
Input
1Expected
12
Input
2Expected
23
Input
4Expected
84
Input
16Expected
327685
Input
64Expected
9223372036854776000Focus radio
Paused · SomaFM · Fluid