title: Nth Even Length Palindrome
signature: fun nthEvenLengthPalindrome(n: String): String {
source_py: def nth_even_length_palindrome(n):
      res = n
      for j in range((len(n) - 1), (- 1), (- 1)):
          res += n[j]
      return res
source_cpp: string nth_even_length_palindrome(string n) {
    string res = n;
    for ( int j = n . length ( ) - 1;
    j >= 0;
    -- j ) res += n [ j ];
    return res;
  }
question_info.test_list: [{"idx": 0, "outputs": "lSUhEvxcgfIIfgcxvEhUSl", "inputs": {"n": "lSUhEvxcgfI"}}, {"idx": 1, "outputs": "7732928338292377", "inputs": {"n": "77329283"}}, {"idx": 2, "outputs": "010111111111111010", "inputs": {"n": "010111111"}}, {"idx": 3, "outputs": "StazbbzatS", "inputs": {"n": "Stazb"}}, {"idx": 4, "outputs": "07022070", "inputs": {"n": "0702"}}, {"idx": 5, "outputs": "0111111111111110", "inputs": {"n": "01111111"}}, {"idx": 6, "outputs": "aa", "inputs": {"n": "a"}}, {"idx": 7, "outputs": "rznbbnzr", "inputs": {"n": "rznb"}}]
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:String, expected:String):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: String, expected:String):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("lSUhEvxcgfI", "lSUhEvxcgfIIfgcxvEhUSl")
      println("TEST-0...${result}")
      
      result = driver("77329283", "7732928338292377")
      println("TEST-1...${result}")
      
      result = driver("010111111", "010111111111111010")
      println("TEST-2...${result}")
      
      result = driver("Stazb", "StazbbzatS")
      println("TEST-3...${result}")
      
      result = driver("0702", "07022070")
      println("TEST-4...${result}")
      
      result = driver("01111111", "0111111111111110")
      println("TEST-5...${result}")
      
      result = driver("a", "aa")
      println("TEST-6...${result}")
      
      result = driver("rznb", "rznbbnzr")
      println("TEST-7...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: nthEvenLengthPalindrome
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3 4 5 6 7
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn