/* Count the number of digits an integer has */
unsigned long long int_count_digits(unsigned long long in) {
  unsigned long long largest_digit;
  int digit_count = 0;
  for (largest_digit = 1; in / largest_digit != 0; largest_digit *= 10)
    ++digit_count;
  return digit_count;
}

/* Expand an integer into an integer whose first unit is 1 followed by a leading trail of 0's*/
unsigned long long int_expand_digits(unsigned long long in) {
  int expanded_digit;
  for (expanded_digit = 1; in != 1; --in)
    expanded_digit *= 10;
  return expanded_digit; 
}
