Given an integer N, find how many digits of 11^N are 1, using O(n) space and time.
Implement count_ones_in_power(n), where n is a non-negative integer. Return the number of occurrences of the decimal digit 1 in the exact decimal representation of 11^n. The output is an integer, and leading zeroes are not included.
def count_ones_in_power(n):