본문 바로가기
Algorithm

[구현/수학] 백준 24736 Football Scoring - 파이썬(Python)

by jangThang 2022. 7. 21.
반응형

백준 온라인 저지

 

[ Contents ]

     

     

    1. 문제 (링크 참조)

     

    24736번: Football Scoring

    There are two lines of input each containing five space-separated non-negative integers, T, F, S, P and C representing the number of Touchdowns, Field goals, Safeties, Points-after-touchdown and two-point Conversions after touchdown respectively. (0 ≤ T

    www.acmicpc.net

     

     

     

    2. 문제 풀이

    ● 터치다운 - 6점
    필드 골 - 3점
    안전 - 2점
    터치다운 후 1점
    ● 터치다운 후 2점

     총 5가지의 점수 항목이 있습니다. 2팀의 항목별 스코어를 보고, 점수를 계산해야 합니다.

     

     

     

    3. 코드

    for _ in range(2):
        # 입력
        # 터치다운 / 필드 골 / 세이프티 / 터치다운 후 포인트 및 2포인트 전환의 수
        a, b, c, d, e = map(int, input().split())
    
        # 계산
        print(a*6+b*3+c*2+d+e*2, end=" ")

     

     

    star가 되고나서 Tistory

    반응형

    댓글