Car Simulator
Limits: 2 sec., 256 MiB
This statement was translated automatically from Ukrainian. In case of any discrepancy, the Ukrainian version is authoritative.
Hey student, do you like playing computer racing games?
Zenyk now has a new favorite racing game where he needs to drive a distance in the shortest possible time — the smaller the time, the better the participant’s result.
If a participant completes the distance faster than \(g\) seconds, they receive a gold medal.
If a participant is not a gold medalist and completes the distance faster than \(s\) seconds, they receive a silver medal.
If a participant is neither a gold nor a silver medalist and completes the distance faster than \(b\) seconds, they receive a bronze medal.
If a participant fails to complete the distance even within \(b\) seconds, they do not receive any medal.
It is known that Zenyk drove from the start to the finish in \(t\) seconds.
Did Zenyk win a medal, and if so, which one?
Input
The single line contains four integers \(g\), \(s\), \(b\), and \(t\), where each of the numbers \(g\), \(s\), \(b\) is the threshold for the gold, silver, and bronze medals respectively, and \(t\) is the time it took Zenyk to drive the distance.
Output
Output a single word — which medal Zenyk will receive.
gold, if Zenyk receives a gold medal.silver, if Zenyk receives a silver medal.bronze, if Zenyk receives a bronze medal.none, if Zenyk does not receive any medal.
You can output the letters of the word in any case. For example, for
a gold medal, the answers gold, GOLD,
Gold, gOLd will be accepted.
You must output to the standard output stream (console). Your output
must strictly match the problem requirements. No extra data should be
outputted. For example, if you output something like
Enter a, b, c: before reading the numbers, or
Answer for the problem: before printing the answer, you
will get the Wrong Answer verdict.
Constraints
\(1 \le g < s < b \le 10^3\),
\(1 \le t \le 10^3\),
\(t \ne g\), \(t \ne s\), \(t \ne b\).
Grading consists of the following blocks:
1 point for each example from the statement,
36 points: \(t < g\),
30 points: \(t < s\),
20 points: \(t < b\),
10 points: no additional constraints.
You will receive points for a block only if your program passes all tests in that block.
Samples
| Input (stdin) | Output (stdout) |
|---|---|
| 444 447 474 400 | gold |
| Input (stdin) | Output (stdout) |
|---|---|
| 444 447 474 445 | silver |
| Input (stdin) | Output (stdout) |
|---|---|
| 444 447 474 460 | bronze |
| Input (stdin) | Output (stdout) |
|---|---|
| 444 447 474 477 | none |
Notes
In the examples, to get a gold medal, one must complete the distance faster than 444 seconds, for silver — faster than 447 seconds, and for bronze — faster than 474 seconds.
In the first example, Zenyk drove the distance in 400 seconds and received a gold medal. In the second example, he completed it in 445 seconds and became a silver medalist. In the third example, Zenyk drove in 460 seconds and received a bronze medal, and in the fourth — in 477 seconds and was left without a medal.
Submit a solution
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|
| Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
|---|