Rugby Club
InterviewTime limit1sMemory limit128 MB
Read repeated name/age/weight lines until a sentinel and print whether each member is Senior or Junior based on simple thresholds.
- Level
Easy1 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Problem
Members of a rugby club are classified as either senior or junior.
A member is senior if their age is greater than 17 or their weight is at least 80 kg. Otherwise, the member is junior. Classify each member correctly.
Input
Each line contains a member's name, age, and weight, separated by spaces. The final line is # 0 0; do not process this line.
A name contains only uppercase and lowercase English letters, and its length is at most 10.
Output
For each member in the input, print the member's name and classification on one line. Print Senior for a senior member and Junior for a junior member.