| CodeRams Practice Problem Archive |
|---|
| Закончено |
While you were at science olympiad, you missed your favorite basketball team's biggest game of the year. You don't know the score, but you know the number of baskets, three-pointers, and free throws made by each team. Your task is to figure out which team won the game based on the given information. Recall that a three-pointer is worth 3 points, a regular basket is worth 2 points, and a free throw is worth one point. The number of baskets made includes three-pointers and two-pointers, but not free throws.
The first line of input contains two space-separated strings: the names of the two teams that played in the basketball game. The second line of input contain two space-separated integers representing the number of baskets made by each team, respectively. The third line of input contain two space-separated integers representing the number of three-pointers made by each team, respectively. The fourth line of input contain two space-separated integers representing the number of free throws made by each team, respectively.
Output a single string: the team that won the game. It is guaranteed that there is a winner, i.e. the score at the end of the game is not a tie.
Syracuse Duke 35 31 11 9 14 20
Syracuse
In the example, Syracuse scored 95 points, and Duke scored 91 points. This game occurred on January 14, 2019.
| Название |
|---|


