Square the Digits

Sometimes it is useful to break a number into digits, transform each digit, and then build a new number from the result. Write square_digits, which takes a non-negative number num, squares each of its digits, joins those squared values together, and returns the result as a number. For example, the digits 9, 1, 1, 9 become 81, 1, 1, 81.

Примеры

Ввод
9119
Вывод
811181
Ввод
0
Вывод
0
Ввод
123
Вывод
149

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

def square_digits(num: int) -> int:

Теги

mathstrings
PostgreSQLv16

Your code output will appear here

Visible tests
1
Input
9119
Expected811181
2
Input
0
Expected0
3
Input
123
Expected149
4
Input
9
Expected81
5
Input
2468
Expected4163664
6
Input
122
Expected144
Focus radio
Paused · SomaFM · Fluid