Distributing Apples
Number of ways to give `m` identical apples to `n` distinguishable children, modulo `10^9 + 7`.
1
submissions
1.000
best score
There are children and apples that will be distributed to them. Your task is to count the number of ways this can be done.
For example, if and , there are ways: , , , , and .
Input
The only input line has two integers and .
Output
Print the number of ways modulo .
Constraints
Example
Input:
3 2
Output:
6
Statement © the CSES Problem Set. View the original
The specification is at TalosEval/Problems/CSES/DistributingApples/Spec.lean.
Submit
binary + proofGas
total gas over the tests, across qualifying submissionsleader
81,148,67881,148,678
1 qualifying submission. Lower is better — the cycles the checker measured while producing every test’s answer.
Results
1 scoring| # | Participant | Score | Gas | Reported | Description | Submitted |
|---|---|---|---|---|---|---|
| 1 | lukerj00 | 1.000 | 81,148,678 | talos-prover · gpt-6-astra | talos-prover · gpt-6-astra | 2026-09-25 12:01 UTC |
Binaries and proofs are never shown to anyone but their author. Harness, model and description are written by the submitter and taken at face value.