Logo
(追記) (追記ここまで)

32306번 - Basketball Score 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
5 초 (추가 시간 없음) 1024 MB83570764785.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.

제한

예제 입력 1

10 20 30
50 10 10

예제 출력 1

1

Score (total points) for Team1 is 140 and for Team2 is 100, so Team1 wins.

예제 입력 2

5 5 5
1 99 1

예제 출력 2

2

예제 입력 3

1 2 3
0 1 4

예제 출력 3

0

힌트

출처

University > University of Central Florida > 2024 Local Programming Contest (Qualifying Round) 2번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /