Остаток от деления на число 8 может быть число 0,1,2,3,4,5,6,7
Остаток от деления на число 5 может быть число 0,1,2,3,4
Остаток от деления на число 3 может быть число 0,1,2
Так как 13=7+4+2 - равен сумме значений максимальных соответствующих остатков, то при деления искомого числа на 8 остаток 7, на 5 остаток 4, на 3 остаток 2
Далее методом перебора:
999 при делении на 8 дает остаток 7, при делении на 5 остаток 4, но делится нацело на 3 - не подходит
999-8=991 при делении на 8 дает остаток 7 , при делении на 5 остаток 1 - не подходит
991-8=983 при делении на 5 остаток 3 - не подходит
983-8=975 делится нацело на 5 - не подходит
975-8=967 при делении на 5 остаток 2 - не подходит
967-8=959 при делении на 5 остаток 4, при делении на 3 остаток 2 - оно искомое
959=8*119+7
959=5*191+4
959=3*319+2
But what a pity, you say that you cannot befriend a wild animal! I'd like to walk down the street with a lion or tiger! Why wild animals don't get along with the person? Yes, now don't get along, but it was not always so. Once upon a time God created the first people — Adam and eve, they lived in the garden of Eden among the magnificent trees and herbs. Next to them lived animals. People and animals lived in harmony, understand each other's language. But the people disobeyed God, and this order was broken. Was not in the soul of man of the world — and the animals ceased to love and obey him. They fled from man. Strong animals are at enmity with him, and the weak run away and hide. Only domestic animals continue to obey the man.