report VI VI EN
Register | Login
  • HOME
  • PROBLEMSET
  • ROADMAP
  • COMPETITION
  • TOPIC
  • RANKING
  • GUIDE
  • MASHUP
  • ABOUT
  • CONTACT
  • Problem
  • Submit
  • Results
Inequation - MarisaOJ: Marisa Online Judge

Inequation

Time limit: 1000 ms
Memory limit: 256 MB
Count the number of non-negative solutions to the following inequality: $$x_1 + x_2 + ... + x_k \le n$$ ### Input - A single line containing two integers $n, k$. ### Output - Print the number of solutions modulo $10^9 + 7$. ### Constraints - $1 \le n,k \le 10^6$. ### Sample test Input ``` 2 3 ``` Output: ``` 10 ```
Introduction to combinatorics
Binomial coefficient
Fork and knife
Binomial coefficient 2
Equation
Array rearrangement
Value of subsequences
Inequation
Growing mushrooms
Binary matrix
Broken board
Triangles counting
Minecraft graph
Restricted path
Heavenly Peach Garden
Topic
Math
Combinatorics
Rating 1400
Solution (0) Solution