calculate the pow
Given number n, print out the number from 1 to n digits