Bronze Ⅴ
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:
입력
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.
비즈니스 클래스에 n1열의 좌석이 있고 이코노미 클래스에 n2열의 좌석이 있다. 비즈니스 클래스에서는 각 열에 k1개의 좌석이 있고 이코노미 클래스에서는 각 열에 k2개의 좌석이 있다. 비즈니스 클래스와 이코노미 클래스의 총 좌석의 개수를 구해라.
C++
#include <iostream>
using namespace std;
int main() {
int n1, k1, n2, k2;
cin >> n1 >> k1 >> n2 >> k2;
cout << n1*k1 + n2*k2;
return 0;
}