No.1407 Kindness
タグ : / 解いたユーザー数 158
作問者 :
PCTprobability
/ テスター :
akakimidori
Izayoi_R_sakura
Problem Statement
You are given a positive integer $N$. PCT-kun wanted to know the sum, over all positive integers from $1$ to $N$, of the product of the digits of each integer, but he could not compute it. So, in his place, please find the sum, over all positive integers from $1$ to $N$, of the product of the digits of each integer. Since the answer can be very large, output the remainder when it is divided by $1000000007$.
Input
$N$
- All inputs are integers.
- $1 \le N \le 10^{100000}$
Output
Find the sum, over all positive integers from $1$ to $N$, of the product of the digits of each integer. Since the answer can be very large, output the remainder when it is divided by $1000000007$.
Sample
Sample 1
Input
12
Output
48
Since $1+2+3+4+5+6+7+8+9+1×0+1×1+1×2=48$, output $48$.
Sample 2
Input
1234567890987654321
Output
333144460
The input can be very large. Also, note that you must find the remainder when the answer is divided by $1000000007$.
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。