title: Count Number Ways Reach Given Score Game
signature: class Solution {
  
      public Integer countNumberWaysReachGivenScoreGame(Integer n) {
source_py: def count_number_ways_reach_given_score_game(n):
      table = [0 for i in range((n + 1))]
      table[0] = 1
      for i in range(3, (n + 1)):
          table[i] += table[(i - 3)]
      for i in range(5, (n + 1)):
          table[i] += table[(i - 5)]
      for i in range(10, (n + 1)):
          table[i] += table[(i - 10)]
      return table[n]
source_cpp: int count_number_ways_reach_given_score_game(int n) {
    int table [ n + 1 ], i;
    for ( int j = 0;
    j < n + 1;
    j ++ ) table [ j ] = 0;
    table [ 0 ] = 1;
    for ( i = 3;
    i <= n;
    i ++ ) table [ i ] += table [ i - 3 ];
    for ( i = 5;
    i <= n;
    i ++ ) table [ i ] += table [ i - 5 ];
    for ( i = 10;
    i <= n;
    i ++ ) table [ i ] += table [ i - 10 ];
    return table [ n ];
  }
question_info.extension: java
question_info.entry_fn_name: countNumberWaysReachGivenScoreGame
question_info.entry_cls_name: Solution
question_info.test_list: [{"idx": 0, "outputs": 30, "inputs": {"n": 83}}, {"idx": 1, "outputs": 4, "inputs": {"n": 29}}, {"idx": 2, "outputs": 1, "inputs": {"n": 17}}, {"idx": 3, "outputs": 1, "inputs": {"n": 12}}, {"idx": 4, "outputs": 37, "inputs": {"n": 93}}, {"idx": 5, "outputs": 16, "inputs": {"n": 55}}, {"idx": 6, "outputs": 33, "inputs": {"n": 97}}, {"idx": 7, "outputs": 27, "inputs": {"n": 75}}, {"idx": 8, "outputs": 2, "inputs": {"n": 22}}, {"idx": 9, "outputs": 10, "inputs": {"n": 52}}]
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(83, 30);
          System.out.println(String.format("%s%s","TEST-0...",result));    
      
          result = validateSolution(29, 4);
          System.out.println(String.format("%s%s","TEST-1...",result));    
      
          result = validateSolution(17, 1);
          System.out.println(String.format("%s%s","TEST-2...",result));    
      
          result = validateSolution(12, 1);
          System.out.println(String.format("%s%s","TEST-3...",result));    
      
          result = validateSolution(93, 37);
          System.out.println(String.format("%s%s","TEST-4...",result));    
      
          result = validateSolution(55, 16);
          System.out.println(String.format("%s%s","TEST-5...",result));    
      
          result = validateSolution(97, 33);
          System.out.println(String.format("%s%s","TEST-6...",result));    
      
          result = validateSolution(75, 27);
          System.out.println(String.format("%s%s","TEST-7...",result));    
      
          result = validateSolution(22, 2);
          System.out.println(String.format("%s%s","TEST-8...",result));    
      
          result = validateSolution(52, 10);
          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__