| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 5 초 (추가 시간 없음) | 1024 MB | 835 | 707 | 647 | 85.923% |
There are three types of shots in basketball: 1 pointer (free throw), 2 pointers, and 3 pointers.
Given how many shots of each type two teams made, determine the winner.
The first input line contains three integers (each between 0 and 99 inclusive), indicating how many shots of each type Team1 made. The first integer indicates 1-pointer shots, the second integer indicates 2-pointer shots, and the third integer indicates 3-pointer shots.
The second input line provides the shots made by Team2, following the same format as the first input line.
Print 1, 2 or 0 (zero), indicating which team won or if the game was a tie. The team with higher score (total points) wins. If both teams have the same total points, then the game is a tie.
10 20 30 50 10 10
1
Score (total points) for Team1 is 140 and for Team2 is 100, so Team1 wins.
5 5 5 1 99 1
2
1 2 3 0 1 4
0