## CCC '19 J1 - Winning Score

View as PDF

Points: 3
Time limit: 1.0s
Memory limit: 32M

Problem types

You record all of the scoring activity at a basketball game. Points are scored by a -point shot, a -point field goal, or a -point free throw.

You know the number of each of these types of scoring for the two teams: the Apples and the Bananas. Your job is to determine which team won, or if the game ended in a tie.

#### Input Specification

The first three lines of input describe the scoring of the Apples, and the next three lines of input describe the scoring of the Bananas. For each team, the first line contains the number of successful -point shots, the second line contains the number of successful -point field goals, and the third line contains the number of successful -point free throws. Each number will be an integer between and , inclusive.

#### Output Specification

The output will be a single character. If the Apples scored more points than the Bananas, output A. If the Bananas scored more points than the Apples, output B. Otherwise, output T, to indicate a tie.

#### Sample Input 1

10
3
7
8
9
6

#### Output for Sample Input 1

B

#### Explanation of Output for Sample Input 1

The Apples scored points and the Bananas scored points, and thus the Bananas won.

#### Input for Sample Input 2

7
3
0
6
4
1

#### Output for Sample Input 2

T

#### Explanation of Output for Sample Input 2

The Apples scored points and the Bananas scored points, and thus it was a tie game.

## Comments

• GabePD  commented on March 6, 2020, 10:03 a.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• vincentlin2047  commented on Feb. 9, 2020, 3:13 p.m.

wassups

• RussianSpy  commented on Dec. 31, 2019, 1:33 p.m.

• sku81da  commented on Oct. 6, 2019, 4:51 a.m.

sure

• clashroyaleoo  commented on Aug. 3, 2019, 8:15 p.m.

basketball games can't end in a tie. the just go to overtime(OT)