#P5257. [JSOI2013] 密码
[JSOI2013] 密码
Background
Will has a mysterious box. It is said that if someone can crack the password on the box, they can foresee the future (for example, know what the official solution of this problem looks like). Would you like to give it a try?
Problem Description
For an -digit decimal integer , define .
Define the set $S_N~=~\{x~|~x~>~0,~g(x)~\leq~N,x~\text{ has no digit equal to } 0 \text{ in its decimal representation}\}$.
Given , compute
$$f(n)~=~\sum_{x \in S_n} \sum_{y \in S_n \land x < y} x~\times~y$$Output the answer modulo .
Input Format
One line with a positive integer .
Output Format
One line with one integer, representing the result of the answer modulo .
2
35
Hint
Explanation for Sample Input/Output 1
, so .
Constraints
For of the testdata, it is guaranteed that .
Translated by ChatGPT 5