메모리: 30860 KB, 시간: 72 ms
수학, 사칙연산
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 values for two competing teams, calculate the point total for each team.
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 ≤ 10), (0 ≤ F ≤ 10), (0 ≤ S ≤ 10), (0 ≤ (P+C) ≤ T). The first line represents the box score for the visiting team, and the second line represents the box score for the home team.
The single output line consists of two space-separated integers showing the visiting score and the home score respectively.