AtCoder Regular Contest 129
翻译中…
Problem Statement
翻译中…
Given is an integer $N$.
翻译中…
Find one string $s$ consisting of 1, 2, $\cdots$, 9 that satisfies the conditions below.
翻译中…
- The length of
$s$,$|s|$, is at most$10^6$. - There are exactly
$N$pairs of integers$(l,r)$($1 \leq l \leq r \leq |s|$) that satisfy the following condition. - When the
$l$-th through$r$-th characters of$s$are extracted and seen as a number, it is divisible by$7$.
翻译中…
Under the Constraints of this problem, we can prove that a solution always exists.
翻译中…
Constraints
翻译中…
$1 \leq N \leq 10^6$- All values in input are integers.
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
N
翻译中…
Output
翻译中…
Print a string $s$ that satisfies the conditions. If multiple solutions exist, printing any of them would be accepted.
翻译中…
样例
Input #1
2
Output #1
142
Two pairs $(l,r)=(1,2),(2,3)$ satisfy the conditions.
Input #2
3
Output #2
77
Three pairs $(l,r)=(1,1),(2,2),(1,2)$ satisfy the conditions.
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。