Marks :15
: 9 | : 2
There are $$$r$$$ red and $$$g$$$ green blocks for construction of the red-green tower. Red-green tower can be built following next rules:
The task is to determine how many different red-green towers can be built out of the available blocks.
Two red-green towers are considered different if there exists some level, that consists of red blocks in the one tower and consists of green blocks in the other tower.
The only line of input contains two integers $$$r$$$ and $$$g$$$, separated by a single space — the number of available red and green blocks respectively $$$(0 \le r, g \le 2 \cdot 10^5, r + g \ge 1)$$$.
Output the only integer — the number of different possible red-green towers modulo $$$10^9 + 7.$$$
4 6
14
9 7
32
1 1
2
You need to login to view your submissions.
You need to login to view all submissions.
Result : Executed
Feel something is wrong with the test cases?
Result : Accepted
Test Cases :
But to Run or Submit the Problem, you need to Log In.
Continue to Log InYour challenge has been submitted successfully.
You will get a response soon via WhatsApp or Email.
Do let us know your issue.