about | help | code help+videos | done | prefs |
Given an equation x1 + x2 +· · ·+xn = C, where C is a constant, and x1, x2, . . . , xn are nonnegative integers, how many solutions are there? I THINK THE PARAMETERS ARE BACKWARDS BUT IT'S TOO LATE TO CHANGE IT countSolutions(8, 3) → 45 countSolutions(2, 2) → 3 countSolutions(3, 2) → 4 ...Save, Compile, Run (ctrl-enter) |
Progress graphs:
Your progress graph for this problem
Random user progress graph for this problem
Random Epic Progress Graph
Difficulty: 300 Post-solution available
Copyright Nick Parlante 2017 - privacy