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

PROGRAMMING:Han Soldiers

Luz5年前 (2021-05-10)题库373
###Task description
It is said that Han Xin is very intelligent. He never counts the number of his troops directly. He only needs to make the soldiers change their formation in three, five and seven rows, and he only glances at the end of the line every time to know the total number. Input three non negative integers a, B, C to represent the number of people at the end of each formation (a < 3, B < 5, C < 7), and output the minimum of the total number (or report no solution). The total number of people known is not less than 10 and not more than 100.
###Input format:
Enter three non negative integers a, B, C to indicate the number of people at the end of each formation (a < 3, B < 5, C < 7). For example, enter 2 4 5
###Output format:
Output the minimum of the total number of people (or report no answer). Example, output: 89
###Input example:
```in
2 1 6
```
###Output example:
```out
forty-one
```
###Tips
This problem exhausts all integers in the range of 10 to 100 to judge whether they meet the conditions. Note that we only need to output the first number that meets the condition, but also pay attention to identify the case of no solution.
###Title Source
Note: this topic is selected from nyoj website http://nyoj.top/problem/34







answer:If there is no answer, please comment