CT21672

Corwin and the Frosted abacus beads

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

Deep in the acacia flats of Thornveld, Corwin studies rows of abacus beads entries. One clean number will settle the guild's oldest argument. Task: Print C(n, r) modulo 1000000007. Input format: One line with two integers n and r. Output format: Print the binomial coefficient mod 1000000007. Constraints: 0 <= r <= n <= 4000.

Example 1:

Input: 3949 1760
Output: 437534864

Example 2:

Input: 3464 1400
Output: 279042825

Example 3:

Input: 2730 2354
Output: 290495751

Constraints:

0 <= r <= n <= 4000.

Loading...
Test Cases:No test cases
No test cases available.