問題一覧 > 通常問題

No.793 Ushi Sequence 2

レベル : / AI推定難易度 : 575 / 実行時間制限 : 1ケース 2.000秒 / メモリ制限 : 512 MB / 標準ジャッジ問題
タグ : (AC するまで非表示) / 解いたユーザー数 231
作問者 : treeone / テスター : ei1333333
お気に入りにしたユーザー ProblemId : 2520 / 自分の提出
問題文最終更新日: 2019-02-22 21:04:21
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もしくは右上の雲マークをクリックしてアカウントを作成してください。