title: Program Octal Decimal Conversion
signature: class Solution {
  
      public Integer programOctalDecimalConversion(Integer n) {
source_py: def program_octal_decimal_conversion(n):
      num = n
      dec_value = 0
      base = 1
      temp = num
      while temp:
          last_digit = (temp % 10)
          temp = int((temp / 10))
          dec_value += (last_digit * base)
          base = (base * 8)
      return dec_value
source_cpp: int program_octal_decimal_conversion(int n) {
    int num = n;
    int dec_value = 0;
    int base = 1;
    int temp = num;
    while ( temp ) {
      int last_digit = temp % 10;
      temp = temp / 10;
      dec_value += last_digit * base;
      base = base * 8;
    }
    return dec_value;
  }
question_info.extension: java
question_info.entry_fn_name: programOctalDecimalConversion
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 31, "inputs": {"n": 37}}, {"idx": 1, "outputs": 21, "inputs": {"n": 25}}, {"idx": 2, "outputs": 51, "inputs": {"n": 63}}, {"idx": 3, "outputs": 54, "inputs": {"n": 66}}, {"idx": 4, "outputs": 26, "inputs": {"n": 32}}, {"idx": 5, "outputs": 5, "inputs": {"n": 5}}, {"idx": 6, "outputs": 33, "inputs": {"n": 41}}, {"idx": 7, "outputs": 66, "inputs": {"n": 82}}, {"idx": 8, "outputs": 44, "inputs": {"n": 54}}, {"idx": 9, "outputs": 5, "inputs": {"n": 5}}]
question_info.test_code: import static java.util.Map.entry;  
  import java.util.*;
  import java.lang.*;
  // TESTING CODE 
  // ============================================
  class QuestionEvaluator {
      public static String validateSolution(Integer n, Integer expected){
          try{
              Driver driver = new Driver();
              if (driver.run(n,expected)){
                  return "PASSED";
              }
              return "FAILED";
              
          } catch (Exception exception_obj){
              return exception_obj.getClass().getSimpleName();
          }
  
      }
      public static void main(String[] args) {
          String result;
          result = validateSolution(37, 31);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(25, 21);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(63, 51);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(66, 54);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(32, 26);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(5, 5);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(41, 33);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(82, 66);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(54, 44);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(5, 5);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer n, Integer expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(n),expected);
      }
      
      public boolean validateSolution(Integer actual, Integer expected){
          return actual.equals(expected);
      }
  }
  
  
  // SOLUTION CODE
  // ============================================
  PLACEHOLDER_CODE_BODY
question_info.test_case_ids: 0 1 2 3 4 5 6 7 8 9
question_info.commands: java __FILENAME__