The War of Problem Setters @ Dcoder

in #programminglast year

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)
Sort:  

Congratulations @lochard! You have completed the following achievement on the Hive blockchain And have been rewarded with New badge(s)

You published more than 100 posts.
Your next target is to reach 150 posts.

You can view your badges on your board and compare yourself to others in the Ranking
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Check out our last posts:

HiveBuzz Women's World Cup Contest - Collect Badges and Prizes - Thousands of HIVE, Tokens or NFTs to be won!