title: Sum Series 555555 N Terms
signature: fun sumSeries555555NTerms(n: Int): Long {
source_py: def sum_series_555555_n_terms(n):
      return int(((0.6172 * (pow(10, n) - 1)) - (0.55 * n)))
source_cpp: int sum_series_555555_n_terms(int n) {
    return 0.6172 * ( pow ( 10, n ) - 1 ) - 0.55 * n;
  }
question_info.test_list: [{"idx": 0, "outputs": 617200000000000000, "inputs": {"n": 18}}, {"idx": 1, "outputs": 61719999999991, "inputs": {"n": 14}}, {"idx": 2, "outputs": 617199999999991, "inputs": {"n": 15}}, {"idx": 3, "outputs": 614, "inputs": {"n": 3}}]
question_info.extension: kts
question_info.test_code: package main
  
  import kotlin.text.*
  import kotlin.math.*
  
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  fun validateSolution(actual:Long, expected:Long):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, expected:Long):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(18, 617200000000000000)
      println("TEST-0...${result}")
      
      result = driver(14, 61719999999991)
      println("TEST-1...${result}")
      
      result = driver(15, 617199999999991)
      println("TEST-2...${result}")
      
      result = driver(3, 614)
      println("TEST-3...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: sumSeries555555NTerms
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn