NeetCode #937LC-2929MediumMath & Geometry
← Back to All Problems

#937 · #2929 · Distribute Candies Among Children II(给小朋友们分糖果 II)

📌 Problem Statement & Constraints

Given two positive integers n and limit, count the ways to distribute n identical candies among 3 children so that no child receives more than limit. Constraints: 1 <= n <= 10^5, 1 <= limit <= 10^5.
🔒

Sign In to Unlock Full Solutions for All 973 Problems

Sign in to access step-by-step logic, benchmark Python3 code, complexity breakdown, and offline export!