Football Scoring
Time limit1sMemory limit1024 MB
Given each team's touchdowns, field goals, safeties, point-after kicks, and two-point conversions, compute each team's total score.
- Level
Easy1 of 10
- Topics
- Implementation
- Solved
- No attempts yet
Problem
There are five ways to score points in American professional football:
- Touchdown: 6 points
- Field goal: 3 points
- Safety: 2 points
- After touchdown
- 1 point (field goal or safety), typically called the 'Point after'
- 2 points (touchdown), typically called the 'Two-point conversion'
(https://operations.nfl.com/the-rules/nfl-video-rulebook/scoring-plays/)
Given the box score for two competing teams, calculate the point total for each team.
Input
There are two lines of input. Each line contains five space-separated non-negative integers T, F, S, P, and C. They are the number of touchdowns, field goals, safeties, point-after-touchdown kicks, and two-point conversions after touchdown. The first line is the box score for the visiting team, and the second line is the box score for the home team.
, , ,
Output
The output is one line with two space-separated integers: the visiting team's score and the home team's score.