title: N Th Number Whose Sum Of Digits Is Ten 2
signature: nThNumberWhoseSumOfDigitsIsTen2(n) {
test_code: import 'dart:convert';
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual.toString() == expected.toString();
  }
  
  String driver(n, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)){
              return "PASSED";
          }
          return "FAILED";
      }catch(exception_object){
          return exception_object.runtimeType.toString();
      }
  }
  
  int main() {
  
      print("TEST-0...${driver(
          68, 
          631)
      }");
  
      print("TEST-1...${driver(
          70, 
          649)
      }");
  
      print("TEST-2...${driver(
          69, 
          640)
      }");
  
      print("TEST-3...${driver(
          93, 
          856)
      }");
  
      print("TEST-4...${driver(
          99, 
          910)
      }");
  
      print("TEST-5...${driver(
          44, 
          415)
      }");
  
      print("TEST-6...${driver(
          91, 
          838)
      }");
  
      print("TEST-7...${driver(
          8, 
          82)
      }");
  
      print("TEST-8...${driver(
          83, 
          766)
      }");
  
      print("TEST-9...${driver(
          51, 
          478)
      }");
  
      return 0;
  }
source_py: def n_th_number_whose_sum_of_digits_is_ten_2(n):
      nthElement = (19 + ((n - 1) * 9))
      outliersCount = (int(math.log10(nthElement)) - 1)
      nthElement += (9 * outliersCount)
      return nthElement
source_cpp: int n_th_number_whose_sum_of_digits_is_ten_2(int n) {
    int nthElement = 19 + ( n - 1 ) * 9;
    int outliersCount = ( int ) log10 ( nthElement ) - 1;
    nthElement += 9 * outliersCount;
    return nthElement;
  }