Project Euler 16 - Power digit sum
Project Euler 16 - Power digit sum
Official link: https://projecteuler.net/problem=16
Official link: https://projecteuler.net/problem=16
We need to design an efficient digit sum function
x % 10 is the last digit of an integer x, then we update x to be be x // 10, which takes off the last digit
Input an integer (yourinput)
Code will output the digit sum of 2^yourinput