WC '18 Contest 1 J3 - Comparing Grades

View as PDF

Submit solution

Points: 5 (partial)
Time limit: 1.0s
Memory limit: 16M

Author:
Problem type
Woburn Challenge 2018-19 Round 1 - Junior Division

As grades from the school year's first science test are being handed back, the students of H.S. High School begin to peer at their marks with dread. With the exception of two particularly competitive friends, that is: Alice and Bob are eager to compare their grades against one another, and see who did better this time around!

Alice received a percentage grade of A (0 \le A \le 100) on the test, while Bob received a percentage grade of B (0 \le B \le 100). However, they don't like to compare these exact percentage grades against one another—instead, they think it's more fun to compare their more approximate letter grades. Each percentage grade corresponds to a letter grade according to the following table:

/------------------------|--------------\
| Percentage Grade Range | Letter Grade |
|------------------------|--------------|
|                90..100 | A            |
|                80.. 89 | B            |
|                70.. 79 | C            |
|                60.. 69 | D            |
|                 0.. 59 | F            |
\------------------------|--------------/

According to Alice and Bob's rules, whichever of them receives a worse letter grade than the other will have to do something embarrassing in front of the class. However, if they both receive the same letter grade, then neither of them will be subjected to this punishment.

As one of their fellow classmates, you'd like to find out if anything embarrassing is going to occur, so that you can have your phone at the ready. In other words, you'd like to determine whether or not Alice and Bob received the same letter grade as one another. Output Same if their letter grades are the same, or Different if they're different.

Input Specification

The first and only line of input consists of two space-separated integers, A and B.

Output Specification

Output a single string, either Same if Alice and Bob received the same letter grade, or Different otherwise.

Sample Input 1

84 89

Sample Output 1

Same

Sample Input 2

60 59

Sample Output 2

Different

Sample Explanation

In the first case, both Alice and Bob received a letter grade of B.

In the second case, Alice received a letter grade of D while Bob received a letter grade of F.


Comments

There are no comments at the moment.