#C10262. User Tier Categorization

    ID: 39448 Type: Default 1000ms 256MiB

User Tier Categorization

User Tier Categorization

You are given information about several users in a social network. Each user is described by two integers representing the number of friends and the number of followers. Your task is to categorize each user into one of three tiers according to the following rules:

  • Gold: if \(friends > 500\) and \(followers > 5000\).
  • Silver: if \(100 \leq friends \leq 500\) or \(1000 \leq followers \leq 5000\) and the user does not meet the Gold criteria.
  • Bronze: for all other cases.

Implement a program that reads input from stdin where the first integer represents the number of users N, followed by N lines each containing two space-separated integers. For each user, output the corresponding tier on a separate line to stdout.

inputFormat

The input starts with an integer N indicating the number of users. The following N lines each contain two integers: the number of friends and the number of followers of a user.

Example:

5
50 200
200 3000
600 2000
800 7000
1000 10000

outputFormat

Output N lines, each line containing one of the strings: Bronze, Silver or Gold. The output should correspond to the tier of each user as determined by the rules.

Example:

Bronze
Silver
Silver
Gold
Gold
## sample
5
50 200
200 3000
600 2000
800 7000
1000 10000
Bronze

Silver Silver Gold Gold

</p>