PROGRAMMING:Han Soldiers
"Chinese Remainder Theorem" is also called "ghost Valley calculation", also known as "partition calculation"; Yang Hui called it "pipe cutting" and the more popular name is "Hanxin Dianbing". This kind of algorithm was first described in a book called Sunzi Suanjing. Later, in the Song Dynasty, after the promotion of mathematician Qin Jiushao, another algorithm was discovered, which was called "Dayan seeking one technique".
Today, there are things whose numbers are unknown. There are two left in three, three left in five, and two left in seven《 Sunzi Suanjing
It is said that when Han Xin ordered his troops, the number of generals was three or three, five or five, and seven or seven.
There are ballads
The three went together for seventy years,
Five trees and twenty-one plum blossoms,
The first half month of Qizi's reunion,
Except one hundred and five.
With this algorithm, the number of people can be calculated
###Input format:
Input three numbers, which are more than three, more than five, more than seven
(enter 0 to end)
###Output format:
Output total number (total number less than 105, more than 0)
###Input example:
Here is a set of inputs. For example:
```in
1 2 2
1 1 1
```
###Output example:
The corresponding output is given here. For example:
```out
thirty-seven
one
```
answer:If there is no answer, please comment
Today, there are things whose numbers are unknown. There are two left in three, three left in five, and two left in seven《 Sunzi Suanjing
It is said that when Han Xin ordered his troops, the number of generals was three or three, five or five, and seven or seven.
There are ballads
The three went together for seventy years,
Five trees and twenty-one plum blossoms,
The first half month of Qizi's reunion,
Except one hundred and five.
With this algorithm, the number of people can be calculated
###Input format:
Input three numbers, which are more than three, more than five, more than seven
(enter 0 to end)
###Output format:
Output total number (total number less than 105, more than 0)
###Input example:
Here is a set of inputs. For example:
```in
1 2 2
1 1 1
```
###Output example:
The corresponding output is given here. For example:
```out
thirty-seven
one
```
answer:If there is no answer, please comment