Dcoder icon

The War of Problem Setters @ Dcoder

By Lochard | As a newbie programmer | 10 Jul 2023


Problem: Garry and Sharry are colleague, assuming they work at Dcoder. They are our Problem Setters.One day we decide to judge their work. Both were given an assignment to make some problems to display at Dcoder, and they were awarded points based on clarity, originality and difficulty of the problem. You have to tell us who performed better in the assignment and what's the difference of their points acquired.

Input: The first line contains 3 space separated integers, describing the points acquired by Garry, next line contains 3 space separated integers, describing the points acquired by Sharry.

Output: Print who performed better and by how much points, separated by a space.

In case of draw, print None and 0,separated by space.

Constraints: Points, on a scale of 1 to 10.

Sample Input: 4 6 3

5 6 1

Sample Output: 

Garry 1

d = sum(map(int, input().split())) - sum(map(int, input().split()))
if d == 0:
  print('None 0')
elif d > 0:
  print('Garry', d)
else:
  print('Sharry', -d)

How do you rate this article?

3


Lochard
Lochard

20240228 Arrived in the UK for about 2 week. All my fears persist. Some are even getting worse. https://github.com/locharp/asylum_diary/


As a newbie programmer
As a newbie programmer

Sharing entry level codes. My snippets on GitHub https://github.com/locharp/code-snippets

Publish0x

Send a $0.01 microtip in crypto to the author, and earn yourself as you read!

20% to author / 80% to me.
We pay the tips from our rewards pool.