Tap here to switch tabs
Problem
Submissions

Problem: Distribute Candies Among Children III

Distribute Candies Among Children III asks for the number of ways to give n candies to three children so each receives no more than the specified limit.

Statement

You are given two positive integers n and limit.

Determine the total number of ways to distribute n candies among 33 children such that no child receives more than limit candies.

Constraints:

  • 1≤1 \leq n ≤108\leq 10^8

  • 1≤1 \leq limit ≤108\leq 10^8

⋮
Tap here to switch tabs
Problem
Submissions

Problem: Distribute Candies Among Children III

Distribute Candies Among Children III asks for the number of ways to give n candies to three children so each receives no more than the specified limit.

Statement

You are given two positive integers n and limit.

Determine the total number of ways to distribute n candies among 33 children such that no child receives more than limit candies.

Constraints:

  • 1≤1 \leq n ≤108\leq 10^8

  • 1≤1 \leq limit ≤108\leq 10^8