title: N Th Number Whose Sum Of Digits Is Ten 2
signature: pub fn n_th_number_whose_sum_of_digits_is_ten_2(n: i32) -> i32 {
test_code: use std::collections::HashMap;
  use std::collections::HashSet;
  use std::cmp::*;
  use std::collections::*;
  use std::fmt::*; 
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  pub fn validate_solution(actual: i32, expected: i32)->bool{
  return actual==expected
  }
  pub fn driver(n: i32, expected: i32)->String{
      if validate_solution(PLACEHOLDER_FN_NAME(n), expected) {
        return "PASSED".to_string();
      };
      return "FAILED".to_string();
  
  }
  
  fn main() {
      println!("TEST-0...{}", driver(
        68, 
        631
      ));
      
      println!("TEST-1...{}", driver(
        70, 
        649
      ));
      
      println!("TEST-2...{}", driver(
        69, 
        640
      ));
      
      println!("TEST-3...{}", driver(
        93, 
        856
      ));
      
      println!("TEST-4...{}", driver(
        99, 
        910
      ));
      
      println!("TEST-5...{}", driver(
        44, 
        415
      ));
      
      println!("TEST-6...{}", driver(
        91, 
        838
      ));
      
      println!("TEST-7...{}", driver(
        8, 
        82
      ));
      
      println!("TEST-8...{}", driver(
        83, 
        766
      ));
      
      println!("TEST-9...{}", driver(
        51, 
        478
      ));
      
  }
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;
  }