ICS Contest 1 Problem 2 - DM Counting

View as PDF

Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type
Allowed languages
Java

Iaminnocent4298 is obsessed with DM message counts. So much, in fact, that he's used it to determine whether the person he's DMing is his friend based solely on the number of messages sent on Discord between them! (this is not actually true i promise) There is a correlation between friendship and the number of messages in the DM. He has three "friendship categories": stranger, friend, and good friend. The categories are separated by two "cutoff" values, A and B. He categorizes people as follows:

Let M be the number of messages sent between him and the other person.

  • If M < A, then the other person is a stranger to him.
  • If A \leq M < B, then the other person is a friend to him.
  • If M \geq B, then the other person is a good friend to him.

Constraints

1 \leq A,B,M \leq 10^6

A < B

Input Specifications

The first and only line will contain space-separated integers A,B,M.

Output Specifications

Output either stranger, friend, or good friend, depending on the categorization above.

Sample Input 1

10000 100000 87105

Sample Output 1

friend

Sample Input 2

5000 25000 25000

Sample Output 2

good friend

Comments

There are no comments at the moment.