title: Sum Series 0 6 0 06 0 006 0 0006 N Terms
signature: class Solution {
  
      public Double sumSeries06006000600006NTerms(Integer n) {
source_py: def sum_series_0_6_0_06_0_006_0_0006_n_terms(n):
      return (0.666 * (1 - (1 / pow(10, n))))
source_cpp: float sum_series_0_6_0_06_0_006_0_0006_n_terms(int n) {
    return ( 0.666 ) * ( 1 - 1 / pow ( 10, n ) );
  }
question_info.extension: java
question_info.entry_fn_name: sumSeries06006000600006NTerms
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 0.5994, "inputs": {"n": 1}}, {"idx": 1, "outputs": 0.65934, "inputs": {"n": 2}}, {"idx": 2, "outputs": 0.665334, "inputs": {"n": 3}}, {"idx": 3, "outputs": 0.6659334, "inputs": {"n": 4}}, {"idx": 4, "outputs": 0.6659933400000001, "inputs": {"n": 5}}, {"idx": 5, "outputs": 0.666, "inputs": {"n": 74}}, {"idx": 6, "outputs": 0.666, "inputs": {"n": 77}}, {"idx": 7, "outputs": 0.666, "inputs": {"n": 67}}, {"idx": 8, "outputs": 0.665999999334, "inputs": {"n": 9}}, {"idx": 9, "outputs": 0.665999999999334, "inputs": {"n": 12}}]
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, Double 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(1, 0.5994);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(2, 0.65934);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(3, 0.665334);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(4, 0.6659334);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(5, 0.6659933400000001);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(74, 0.666);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(77, 0.666);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(67, 0.666);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(9, 0.665999999334);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(12, 0.665999999999334);
          System.out.println(String.format("%s%s","TEST-9...",result));    
      
      }
  }
  
  class Driver{
      public boolean run(Integer n, Double expected){
  
          PLACEHOLDER_CLS_NAME sol = new PLACEHOLDER_CLS_NAME();
          return validateSolution(sol.PLACEHOLDER_FN_NAME(n),expected);
      }
      
      public boolean validateSolution(Double actual, Double expected){
          return Math.abs(actual - expected) < 1e-09;
      }
  }
  
  
  // 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__