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

PROGRAMMING:Chinese Remainder Theorem (2)

Luz5年前 (2021-05-10)题库488
After making the Chinese Remainder Theorem (1), Xiao Ming, who is eager to learn, thinks that if n% 3 = a, n% 5 = B, n% 7 = C, it will not be a problem to find the m-th smallest qualified n.
###Input format:
Enter an m in the first line to find the m-th qualified n. The second is three integers a, B, C. There are multiple sets of test data.
###Output format:
Output the M th n that meets the condition
###Input example:
Here is a set of inputs. For example:
```in
one
0 0 0
two
1 1 1
two
1 2 3
```
###Output example:
The corresponding output is given here. For example:
```out
0
one hundred and six
one hundred and fifty-seven
```







answer:If there is no answer, please comment