title: N Th Number Whose Sum Of Digits Is Ten 2
signature: function nThNumberWhoseSumOfDigitsIsTen2(n: number): number {
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;
  }
question_info.test_list: [{"idx": 0, "outputs": 631, "inputs": {"n": 68}}, {"idx": 1, "outputs": 649, "inputs": {"n": 70}}, {"idx": 2, "outputs": 640, "inputs": {"n": 69}}, {"idx": 3, "outputs": 856, "inputs": {"n": 93}}, {"idx": 4, "outputs": 910, "inputs": {"n": 99}}, {"idx": 5, "outputs": 415, "inputs": {"n": 44}}, {"idx": 6, "outputs": 838, "inputs": {"n": 91}}, {"idx": 7, "outputs": 82, "inputs": {"n": 8}}, {"idx": 8, "outputs": 766, "inputs": {"n": 83}}, {"idx": 9, "outputs": 478, "inputs": {"n": 51}}]
question_info.entry_cls_name: Solution
question_info.test_code: 
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  function convertToString(value: any): string{
      return JSON.stringify(value, function (key, val) {
          if (val instanceof Set) {
              return Array.from(val);
          } return val;});
  }
  
  function validateSolution(actual: number, expected: number): boolean {
      return convertToString(actual) === convertToString(expected);
  }
  
  function driver(n: number, expected:number): string {
      try{
          if (validateSolution(PLACEHOLDER_FN_NAME(n),expected)){
              return "PASSED";
          }
          return "FAILED";
      } catch (error) {
        return error.name;
      }
      
  }
      
  function main(){
    let result = '';
    result = driver(68, 631);
    console.log(`TEST-0...${result}`);
  
    result = driver(70, 649);
    console.log(`TEST-1...${result}`);
  
    result = driver(69, 640);
    console.log(`TEST-2...${result}`);
  
    result = driver(93, 856);
    console.log(`TEST-3...${result}`);
  
    result = driver(99, 910);
    console.log(`TEST-4...${result}`);
  
    result = driver(44, 415);
    console.log(`TEST-5...${result}`);
  
    result = driver(91, 838);
    console.log(`TEST-6...${result}`);
  
    result = driver(8, 82);
    console.log(`TEST-7...${result}`);
  
    result = driver(83, 766);
    console.log(`TEST-8...${result}`);
  
    result = driver(51, 478);
    console.log(`TEST-9...${result}`);
  
  };
  
  main();
question_info.extension: ts
question_info.entry_fn_name: nThNumberWhoseSumOfDigitsIsTen2
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: tsc --target es2020 --lib es5,dom,es2015,es2020 __FILENAME__
question_info.commands: node __FILENAME__.js