Woburn Challenge 2018-19 Round 1 - Junior Division

Problem 3: Comparing Grades

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 ≤ A ≤ 100) on the test, while Bob received a percentage grade of B (0 ≤ B ≤ 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" (without quotes) if their letter grades are the same, or "Different" if they're different.

Input Format

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

Output Format

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.

All Submissions
Best Solutions


Point Value: 5 (partial)
Time Limit: 2.00s
Memory Limit: 16M
Added: Nov 17, 2018
Author: SourSpinach

Languages Allowed:
C++03, PAS, C, HASK, ASM, RUBY, PYTH2, JAVA, PHP, SCM, CAML, PERL, C#, C++11, PYTH3

Comments (Search)

It's quiet in here...