Vocative Pronouns
Xem dạng PDF
Gửi bài giải
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch, TEXT
Điểm:
1,00
Giới hạn thời gian:
1.0s
Giới hạn bộ nhớ:
256M
Dạng bài
Ngôn ngữ cho phép
How to Address a Person
Given a person Y with information about their age and gender, determine how we should address them according to the following rules:
Beif the person is not older than 5 years old.Emif the person is not older than 20 years old.Anhif the person is not older than 35 years old and is male.Chiif the person is not older than 35 years old and is female.Chuif the person is not older than 60 years old and is male.Coif the person is not older than 60 years old and is female.Ongif the person is older than 60 years old and is male.Baif the person is older than 60 years old and is female.
Input
The input contains:
- An integer representing the person's age.
- A string representing the person's gender.
The gender is either:
Namfor male.Nufor female.
Output
Output one word representing how person Y should be addressed.
Example
Input
18 Nam
Output
Em
Bình luận