No.741 AscNumber(Easy)
問題文最終更新日: 2018-10-13 17:21:45
English (AI translation)
This statement was translated by AI (claude-opus-5-5, effort medium) and may contain errors or differ in nuance from the original. The original statement takes precedence.
Back to the original
yukicoder contest 201
(順位表)
の他の問題:
Problem Statement
We define an AscNumber as a non-negative integer whose digits are arranged in ascending order when written in base $10$.
For example, $0,1,9,123,1359,12234,55555$ are AscNumbers. $21,132,3141,2590,43221$ are not AscNumbers.
Given a positive integer $N$, find how many AscNumbers are less than $10^N$.
Since the answer can be large, output it modulo $10^9 + 7$.
Input
N
$1 <= N <= 1000000$
Output
Output the number of AscNumbers (mod 10^9 + 7).
Print a newline at the end.
Sample
Sample 1
Input
1
Output
10
All of 0 to 9 are AscNumbers.
Sample 2
Input
8
Output
24310
Sample 3
Input
893
Output
919248923
$N$ is given in base 10.
Output the remainder when divided by 1000000007.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
startcpp