TopCoder problem "Football" used in TCCC '01 Round 2 (Division I Level Three)



Problem Statement

    
Create a class called Football. In football, scores are incremented by either
2, 3, or 7 points. Given a numerical input (integer between 1 and 75)
representing a final score, calculate the number of all possible combinations
of (2, 3, 7) which add up to that score. The output should be the number of
combinations found. Here are a couple of examples:

input | output | combinations
1       0
4       1        (2, 2)
9       3        (2, 7), (2, 2, 2, 3), (3, 3, 3)
11      3        (2, 2, 7), (2, 2, 2, 2, 3), (2, 3, 3, 3)

Here is the method signature (be sure your method is public:
int fetchCombinations(int input)

We will check to make sure the input to this problem is valid.
 

Definition

    
Class:Football
Method:fetchCombinations
Parameters:int
Returns:int
Method signature:int fetchCombinations(int param0)
(be sure your method is public)
    

Problem url:

http://www.topcoder.com/stat?c=problem_statement&pm=42

Problem stats url:

http://www.topcoder.com/tc?module=ProblemDetail&rd=2001&pm=42

Writer:

Unknown

Testers:

Problem categories:

Dynamic Programming