問題一覧 > 通常問題

No.1407 Kindness

レベル : / AI推定難易度 : 1700 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 158
作問者 : PCTprobability / テスター : akakimidori Izayoi_R_sakura
お気に入りにしたユーザー ProblemId : 5593 / 自分の提出
問題文最終更新日: 2021-02-26 23:28:43
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 284 (順位表) の他の問題:

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もしくは右上の雲マークをクリックしてアカウントを作成してください。