문제
Byteland Airlines recently extended their aircraft fleet with a new model of a plane. The new acquisition has $n_1$ rows of seats in the business class and $n_2$ rows in the economic class. In the business class each row contains $k_1$ seats, while each row in the economic class has $k_2$ seats.
Write a program which:
- reads information about available seats in the plane,
- calculates the sum of all seats available in that plane,
- writes the result.
입력
In the first and only line of the standard input there are four integers $n_1, k_1, n_2$ and $k_2$ $(1 ≤ n_1, k_1, n_2, k_2 ≤ 1,000)$, separated by single spaces.
출력
The first and only line of the standard output should contain one integer - the total number of seats available in the plane.
풀이
- The number of economy seat : $n_1*k_1$
- The number of business seat : $n_2*k_2$
코드
n1, k1, n2, k2 = map(int, input().split())
economy = n1*k1
business = n2*k2
print(economy+business)
chat_bubble 댓글남기기
댓글남기기