No.793 Ushi Sequence 2
問題文最終更新日: 2019-02-22 21:04:21
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 206
(順位表)
の他の問題:
Problem Statement
Let the $i$-th term of the sequence $E$ be $E_i = 1\underbrace{333\cdots 3}_{i 個}$ (the number which, in base $10$, is a $1$ followed by $i$ $3$s), where $i$ is a positive integer.
Find the remainder when the $N$-th term $E_N$ of the sequence $E$ is divided by $1000000007$.
Input
$N$
$1 \leq N \leq 10^{18}$
$N$ is an integer.
Output
Output the answer on a single line ($1$ line). Print a newline at the end.
Sample
Sample 1
Input
3
Output
1333
Sample 2
Input
9
Output
333333326
提出するには、Twitter 、GitHub、 Googleもしくは右上の雲マークをクリックしてアカウントを作成してください。
treeone
ei1333333