728x90
https://www.acmicpc.net/problem/8370
문제
Byteland Airlines recently extended their aircraft fleet with a new model of a plane. The new acquisition has n1 rows of seats in the business class and n2 rows in the economic class. In the business class each row contains k1 seats, while each row in the economic class has k2 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 n1, k1, n2 and k2 (1 ≤ n1, k1, n2, k2 ≤ 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.
728x90
예제 입력 1
2 5 3 20
예제 출력 1
70
# business class는 n1*k1개의 좌석이 있고,
# economic class는 n2*k2개의 좌석이 있다.
# n1, k1, n2, k2 순으로 입력이 들어올 때,
# 총 좌석의 개수를 출력하라
n1, k1, n2, k2 = map(int, input().split())
print(n1 * k1 + n2 * k2)
728x90
'Problem Solving > BOJ' 카테고리의 다른 글
[백준, BOJ 9654] 나부 함대 데이터 (python) (0) | 2021.11.19 |
---|---|
[백준, BOJ 9653] 스타워즈 로고 (python) (0) | 2021.11.18 |
[백준, BOJ 6749] Next in line (python) (0) | 2021.11.17 |
[백준, BOJ 5554] 심부름 가는 길 (python) (0) | 2021.11.17 |
[백준, BOJ 5522] 카드 게임 (python) (0) | 2021.11.17 |