Tap here to switch tabs
Problem
Submissions

Problem: The Number of Ways to Make the Sum

med
30 min
Try to solve the The Number of Ways to Make the Sum problem.

Statement

You are given an integer n. You have an infinite supply of coins with values 11, 22, and 66, and at most two coins of value 44.

Return the total number of distinct combinations of coins that sum up to n. Since the answer may be very large, return it modulo 109+710^9 + 7.

Constraints:

  • 1≤1 \leq n ≤105\leq 10^5

⋮
Tap here to switch tabs
Problem
Submissions

Problem: The Number of Ways to Make the Sum

med
30 min
Try to solve the The Number of Ways to Make the Sum problem.

Statement

You are given an integer n. You have an infinite supply of coins with values 11, 22, and 66, and at most two coins of value 44.

Return the total number of distinct combinations of coins that sum up to n. Since the answer may be very large, return it modulo 109+710^9 + 7.

Constraints:

  • 1≤1 \leq n ≤105\leq 10^5