title: Write You Own Power Without Using Multiplication And Division
signature: func writeYouOwnPowerWithoutUsingMultiplicationAndDivision(a int, b int) int {
test_code: package main
  
  import (
      "fmt"
      "reflect"
      "math"
      "sort"
  )
  
  // SOLUTION CODE
  // ===================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE
  // ===================================
  func validateSolution(actual int, expected int) bool {
      return reflect.DeepEqual(actual,expected)
  }
  
  func driver(a int, b int, expected int) string {
      if validateSolution(PLACEHOLDER_FN_NAME(a, b),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(66, 
  	4, 18974736)
      fmt.Printf("TEST-0...%s\n", result)
      
          
  }
source_py: def write_you_own_power_without_using_multiplication_and_division(a, b):
      if (b == 0):
          return 1
      answer = a
      increment = a
      for i in range(1, b):
          for j in range(1, a):
              answer += increment
          increment = answer
      return answer
source_cpp: int write_you_own_power_without_using_multiplication_and_division(int a, int b) {
    if ( b == 0 ) return 1;
    int answer = a;
    int increment = a;
    int i, j;
    for ( i = 1;
    i < b;
    i ++ ) {
      for ( j = 1;
      j < a;
      j ++ ) {
        answer += increment;
      }
      increment = answer;
    }
    return answer;
  }