#C5160. Animal Classification
Animal Classification
Animal Classification
Given the characteristics of an animal, classify it into one of the following groups: Invertebrate, Mammal, Bird, Reptile, or Amphibian. The classification rules are:
- If the animal does not have a vertebral column, it is classified as Invertebrate.
- If the animal is warm-blooded:
- If it gives live birth, classify it as Mammal.
- Otherwise, classify it as Bird.
- If the animal is not warm-blooded:
- If it gives live birth, classify it as Amphibian.
- Otherwise, classify it as Reptile.
The animal’s name is provided for identification only and does not affect the classification.
inputFormat
The input consists of four lines:
- A string representing the name of the animal.
- An integer (0 or 1) indicating whether the animal has a vertebral column (1 for True, 0 for False).
- An integer (0 or 1) indicating whether the animal is warm-blooded (1 for True, 0 for False).
- An integer (0 or 1) indicating whether the animal gives live birth (1 for True, 0 for False).
outputFormat
Output a single line containing the classification: one of Invertebrate, Mammal, Bird, Reptile, or Amphibian.
## sampleJellyfish
0
0
0
Invertebrate