AIM Tech Round 5 (rated, Div. 1 + Div. 2)
B
Unnatural Conditions
Codeforces
1200
原题
← AC →
翻译中…

Let $s(x)$ be sum of digits in decimal representation of positive integer $x$. Given two integers $n$ and $m$, find some positive integers $a$ and $b$ such that

翻译中…
  • $s(a) \ge n$,
  • $s(b) \ge n$,
  • $s(a + b) \le m$.
翻译中…

Input

翻译中…

The only line of input contain two integers $n$ and $m$ ($1 \le n, m \le 1129$).

翻译中…

Output

翻译中…

Print two lines, one for decimal representation of $a$ and one for decimal representation of $b$. Both numbers must not contain leading zeros and must have length no more than $2230$.

翻译中…

Note

翻译中…

In the first sample, we have $n = 6$ and $m = 5$. One valid solution is $a = 6$, $b = 7$. Indeed, we have $s(a) = 6 \ge n$ and $s(b) = 7 \ge n$, and also $s(a + b) = s(13) = 4 \le m$.

翻译中…

样例

Input #1
6 5
Output #1
6
7
InputCopy OutputCopy
Input #2
8 16
Output #2
35
53
InputCopy OutputCopy
题目信息
题号
1028B
时间限制
1 s
内存限制
256 MB
标签
构造
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。