#K39052. Image Categorization Challenge
Image Categorization Challenge
Image Categorization Challenge
Image Categorization Challenge
Given a string representation of an image, determine its category based on the presence of certain letter features corresponding to three distinct categories: Animal, Vehicle, and Plant. The string consists of lowercase letters only. For each character in the string, count how many times it appears in each of the following feature sets:
- Animal: \(\{a, n, i, m, l\}\)
- Vehicle: \(\{v, e, h, c, l\}\)
- Plant: \(\{p, a, n, t, l\}\)
Output the category with the highest count. In the event of a tie, choose the category that comes first in alphabetical order.
inputFormat
A single line containing a string of lowercase letters representing the image.
outputFormat
A single line output denoting the category of the image. It will be one of: Animal, Vehicle, or Plant.## sample
animmalph
Animal
</p>