New answers tagged

0

num_to_arr(num): length_of_arr = log(num)+1 //log(num) base 10 arr[length_of_arr] digit = 0 while num > 0: digit = num % 10 arr[length_of_arr - 1] = digit length_of_arr = length_of_arr - 1 num = num / 10 return arr This should do the job.


Top 50 recent answers are included