title: Write You Own Power Without Using Multiplication And Division
signature: int writeYouOwnPowerWithoutUsingMultiplicationAndDivision(int a, int b) {
test_code: #include <algorithm>
  #include <assert.h>
  #include <cstdlib>
  #include <iostream>
  #include <map>
  #include <set>
  #include <string>
  #include <tuple> 
  #include <unordered_map>
  #include <vector>
  #include <math.h>
  #include <cmath>
  #include <bits/stdc++.h>
  #include <numeric>
  #include <functional>
  
  using namespace std;
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
  
  // TESTING CODE 
  // ============================================
  bool validateSolution(int actual, int expected){
      return actual == expected;
  }
  
  string driver(int a, int b, int expected){
      try
      {
          if (validateSolution(PLACEHOLDER_FN_NAME(a, b), expected)){
              return "PASSED";
          }
          return "FAILED";
      }
      catch (const std::overflow_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::runtime_error& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (const std::exception& exception_obj)
      {
          return typeid(exception_obj).name();
      }
      catch (...)
      {
          return "UNK_ERROR";
      }
  }
  
  int main() {
      string result = "";
  
      result = driver(66, 4, 18974736); 
      cout << "TEST-" << 0 << "..."
           <<  result
           << "\n";
  
      return 0;
  }
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;
  }