Write a code that takes a given number, converts it to a bytes object and outputs the sum of its bytes.
A little spoiler: the test numbers are going to be greater than 255, so you're going to need at least 2 bytes to encode them.
Write a code that takes a given number, converts it to a bytes object and outputs the sum of its bytes.
A little spoiler: the test numbers are going to be greater than 255, so you're going to need at least 2 bytes to encode them.
Sample Input 1:
2024Sample Output 1:
239Create a free account to access the full topic