Notice
Recent Comments
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | |||||
3 | 4 | 5 | 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 |
17 | 18 | 19 | 20 | 21 | 22 | 23 |
24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 |
Tags
- 편스토랑
- 논현역 맛집
- Real or Not? NLP with Disaster Tweets
- programmers
- 프로그래머스
- ubuntu
- SW Expert Academy
- Docker
- dacon
- Git
- Kaggle
- 자연어처리
- PYTHON
- selenium
- 캐글
- elasticsearch
- 캐치카페
- hackerrank
- 코로나19
- 데이콘
- 우분투
- leetcode
- 금융문자분석경진대회
- 파이썬
- 더현대서울 맛집
- 백준
- github
- AI 경진대회
- 맥북
- Baekjoon
- Today
- 2,197
- Total
- 1,595,435
솜씨좋은장씨
[BaekJoon] 24736번 : Football Scoring (Python) 본문
728x90
반응형
코딩 1일 1문제! 오늘의 문제는 백준의 Football Scoring 입니다.
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
👨🏻💻 코드 ( Solution )
def calculate_score(team_score, score_map):
return sum([(team * score) for team, score in zip(team_score, score_map)])
def football_scoring(team1, team2):
score_map = [6, 3, 2, 1, 2]
team_1_score = calculate_score(team1, score_map)
team_2_score = calculate_score(team2, score_map)
return f"{team_1_score} {team_2_score}"
if __name__ == "__main__":
team1 = list(map(int, input().split()))
team2 = list(map(int, input().split()))
print(football_scoring(team1, team2))
GitHub - SOMJANG/CODINGTEST_PRACTICE: 1일 1문제 since 2020.02.07
1일 1문제 since 2020.02.07. Contribute to SOMJANG/CODINGTEST_PRACTICE development by creating an account on GitHub.
github.com
728x90
반응형
'Programming > 코딩 1일 1문제' 카테고리의 다른 글
[BaekJoon] 21300번 : Bottle Return (Python) (0) | 2022.05.27 |
---|---|
[BaekJoon] 20254번 : Site Score (Python) (0) | 2022.05.26 |
[BaekJoon] 24736번 : Football Scoring (Python) (0) | 2022.05.25 |
[BaekJoon] 1964번 : 오각형, 오각형, 오각형... (Python) (0) | 2022.05.24 |
[BaekJoon] 19698번 : 헛간 청약 (Python) (0) | 2022.05.23 |
[BaekJoon] 22193번 : Multiply (Python) (0) | 2022.05.22 |
0 Comments