编程题:football scoreing
There are five ways to score points in american professional football:
1) Touchdown - 6 points
2) Field Goal - 3 points
3) Safety - 2 points
4) After touchdown
a) 1 point (Field Goal or Safety) - Typically called the “Point after”
b) 2 points (touchdown) - Typically called the “Two-point conversion”
Given the box score values for two competing teams, calculate the point total for each team.
### Input:
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 andtwo-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 linere presents the box score for the home team.
### Output:
The single output line consists of two space-separated integers showing the visiting score and the home score respectively
### Sample Input:
in
1 3 0 0 1
3 1 1 1 1
### Sample Output:
out
17 26
答案:若无答案欢迎评论
1) Touchdown - 6 points
2) Field Goal - 3 points
3) Safety - 2 points
4) After touchdown
a) 1 point (Field Goal or Safety) - Typically called the “Point after”
b) 2 points (touchdown) - Typically called the “Two-point conversion”
Given the box score values for two competing teams, calculate the point total for each team.
### Input:
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 andtwo-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 linere presents the box score for the home team.
### Output:
The single output line consists of two space-separated integers showing the visiting score and the home score respectively
### Sample Input:
in
1 3 0 0 1
3 1 1 1 1
### Sample Output:
out
17 26
答案:若无答案欢迎评论