[LeetCode] Number of Ways to Earn Points

1 · · March 5, 2023, 5:41 a.m.
2585. Number of Ways to Earn Points There is a test that has n types of questions. You are given an integer target and a 0-indexed 2D integer array types where types[i] = [counti, marksi] indicates that there are counti questions of the ith type, and each one of them is worth marksi points. Return the number of ways you can earn exactly target points in the exam. Since the answer may be too large, return it modulo 109 + 7. Note that questions of the same type are indistinguishable. For example...