title: Count Number Ways Reach Given Score Game
signature: func countNumberWaysReachGivenScoreGame(n 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(n int, expected int) string {
      if validateSolution(PLACEHOLDER_FN_NAME(n),expected) {
              return "PASSED"
      }
      return "FAILED"
  
  }
  
  func main() {
  
      // Use imports to avoid undefined errors
      var _ = reflect.DeepEqual
      _ = math.Abs
      _ = sort.Sort
      result := ""
      result = driver(83, 30)
      fmt.Printf("TEST-0...%s\n", result)
      
      result = driver(29, 4)
      fmt.Printf("TEST-1...%s\n", result)
      
      result = driver(17, 1)
      fmt.Printf("TEST-2...%s\n", result)
      
      result = driver(12, 1)
      fmt.Printf("TEST-3...%s\n", result)
      
      result = driver(93, 37)
      fmt.Printf("TEST-4...%s\n", result)
      
      result = driver(55, 16)
      fmt.Printf("TEST-5...%s\n", result)
      
      result = driver(97, 33)
      fmt.Printf("TEST-6...%s\n", result)
      
      result = driver(75, 27)
      fmt.Printf("TEST-7...%s\n", result)
      
      result = driver(22, 2)
      fmt.Printf("TEST-8...%s\n", result)
      
      result = driver(52, 10)
      fmt.Printf("TEST-9...%s\n", result)
      
          
  }
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 ];
  }