A - Multiples in the String Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MiB

配点 : 600

問題文

この問題は output-only です。入力は与えられません。

正整数 X と文字列 S の組 (X, S) であって以下の条件を全て満たすものを 1 つ挙げてください。

  • X10^{50} 以上 10^{5000} 未満の正整数である。
  • S0 から 9 までの数字からなる長さ 5000 以下の文字列である。
  • 1 \leq i \leq 1000 を満たす整数 i 全てに対して次の条件が成り立つ。
    • Xi 倍した整数を 10 進表記して出来る文字列は S の(連続な)部分文字列である。

入力

この問題では入力は与えられない。

出力

問題文の条件を満たす (X, S) を以下の形式で出力せよ。(条件を満たす (X, S) は少なくとも 1 組存在する。)
なお、この問題では X を leading-zeros を含んだ表現で出力してもよいが、その場合は文字列としての長さが 5000 文字以下となるように出力せよ。

X
S

出力例

問題文の条件を満たさない出力例を以下に挙げます。

5
105

この出力例は問題文の条件を満たしません。理由は次の通りです。

  • X の値の範囲は問題文の 1 番目の条件を満たさない。
  • i = 1, 2 において 5, 10S の部分文字列である。しかし、i=3 において 15S の部分文字列でない。よって (X, S) は問題文の 3 番目の条件を満たさない。

Score : 600 points

Problem Statement

This problem is output-only. No input is given.

Present one pair (X, S) of a positive integer X and a string S that satisfies all of the following conditions.

  • X is a positive integer at least 10^{50} and less than 10^{5000}.
  • S is a string of length at most 5000, consisting of digits from 0 to 9.
  • For every integer i such that 1 \leq i \leq 1000, the following condition is satisfied:
    • The decimal representation of X multiplied by i is a (contiguous) substring of S.

Input

No input is given for this problem.

Output

Print a pair (X, S) satisfying the conditions stated in the problem in the following format (there exists at least one such pair (X, S)).
You may include leading zeros when outputting X, but in that case, make sure that the string representation of X has length at most 5000.

X
S

Sample Output

Below is an example of output that does not satisfy the conditions in the problem statement.

5
105

This sample output does not satisfy the problem statement for the following reasons:

  • The value of X does not meet the first condition of the problem statement regarding its range.
  • For i = 1 and 2, 5 and 10 are substrings of S. However, for i = 3, 15 is not a substring of S. Thus, (X, S) fails to meet the third condition of the problem statement.