title: Gcd Elements Given Range
signature: fun gcdElementsGivenRange(n: Int, m: Int): Int {
source_py: def gcd_elements_given_range(n, m):
      return (n if (n == m) else 1)
source_cpp: int gcd_elements_given_range(int n, int m) {
    return ( n == m ) ? n : 1;
  }
question_info.test_list: [{"idx": 0, "outputs": 57, "inputs": {"n": 57, "m": 57}}, {"idx": 1, "outputs": 22, "inputs": {"n": 22, "m": 22}}, {"idx": 2, "outputs": 17, "inputs": {"n": 17, "m": 17}}, {"idx": 3, "outputs": 74, "inputs": {"n": 74, "m": 74}}, {"idx": 4, "outputs": 1, "inputs": {"n": 93, "m": 22}}, {"idx": 5, "outputs": 1, "inputs": {"n": 56, "m": 54}}, {"idx": 6, "outputs": 1, "inputs": {"n": 5, "m": 33}}, {"idx": 7, "outputs": 1, "inputs": {"n": 5, "m": 68}}, {"idx": 8, "outputs": 1, "inputs": {"n": 9, "m": 75}}, {"idx": 9, "outputs": 1, "inputs": {"n": 98, "m": 21}}]
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:Int, expected:Int):Boolean{
    return actual.equals(expected)
  }
  fun driver(n: Int, m: Int, expected:Int):String {
      try{
        if (validateSolution(PLACEHOLDER_FN_NAME(n, m), expected)) {
                return "PASSED"
        }
        return "FAILED"
      } catch (e: Exception){
        return e::class.simpleName as String
      }
  
  }
  
  fun main() {
      var result: String = ""
      result = driver(57, 57, 57)
      println("TEST-0...${result}")
      
      result = driver(22, 22, 22)
      println("TEST-1...${result}")
      
      result = driver(17, 17, 17)
      println("TEST-2...${result}")
      
      result = driver(74, 74, 74)
      println("TEST-3...${result}")
      
      result = driver(93, 22, 1)
      println("TEST-4...${result}")
      
      result = driver(56, 54, 1)
      println("TEST-5...${result}")
      
      result = driver(5, 33, 1)
      println("TEST-6...${result}")
      
      result = driver(5, 68, 1)
      println("TEST-7...${result}")
      
      result = driver(9, 75, 1)
      println("TEST-8...${result}")
      
      result = driver(98, 21, 1)
      println("TEST-9...${result}")
      
          
  }
  
  main()
question_info.entry_fn_name: gcdElementsGivenRange
question_info.entry_cls_name: Solution
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: kotlinc -script __FILENAME__ -no-reflect -nowarn