atcoder#ARC144A. [ARC144A] Digit Sum of 2x
[ARC144A] Digit Sum of 2x
Score : points
Problem Statement
For a positive integer , let be the sum of its digit. For example, and .
You are given a positive integer . Find the following positive integers and :
- The maximum positive integer for which there exists a positive integer such that and .
- The minimum positive integer such that and for the above.
Constraints
Input
Input is given from Standard Input in the following format:
Output
Print in the first line and in the second line.
3
6
3
We can prove that whenever , . Thus, . The minimum positive integer such that and is . These and should be printed.
6
12
24
100
200
4444444444444444444444444