CT21696

The Amber Choice Count

EasyL3 · Syntax SurferAcceptance: 0.0%XP: 20

The paymaster Axel has been asked to catalog the new acquisitions. On the desk lies a long table of cogs readings. 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 <= 1000.

Example 1:

Input: 179 104
Output: 177158467

Example 2:

Input: 673 190
Output: 742359463

Example 3:

Input: 339 311
Output: 269683922

Constraints:

0 <= r <= n <= 1000.

Loading...
Test Cases:No test cases
No test cases available.
The Amber Choice Count - EASY Coding Problem | CodeTikki