-->
当前位置:首页 > 题库

PROGRAMMING:Year of birth

Luz5年前 (2021-05-10)题库448
![](~/ 355)
The above is a wonderful post on Sina Weibo: "I was born in 1988. I didn't meet four years with different numbers until I was 25 years old." In other words, it was not until 2013 that the requirement of "four different numbers" was met. Please fill in the sentence "I was born in 'y' year, and I didn't come across' n 'years with different numbers until' x 'year".
###Input format:
Enter the number of different numbers' n 'in the given birth year' y 'and target year in one line, where' y 'is between [1, 3000], and' n 'can be 2, or 3, or 4. Note that years with less than four digits should be preceded by zeros. For example, year 1 is considered to be year 0001, with two different numbers 0 and 1.
###Output format:
According to the input, output 'x' and the year that can meet the requirements. The numbers should be separated by one space, and there should be no extra space at the beginning and end of the line. The year should be output by 4 digits. Note: the so-called "n numbers are not the same" means that different numbers are exactly n numbers. For example, "2013" is regarded as meeting the condition of "four digits are different", but it is not regarded as meeting the condition of two or three digits.
###Input sample 1:
```in
1988 4
```
###Output sample 1:
```out
25 2013
```
###Input example 2:
```
1 2
```
###Output example 2:
```
0 0001
```






answer:If there is no answer, please comment