[백준] 8370번

park jinwoo·2022년 12월 6일
0

백준

목록 보기
21/94

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.

(새로운 기종의 비행기로 확장했는데, 비즈니스 클래스에 n1, 이코노미 클래스에 n2열의 좌석이 있고
비즈니스 클래스에서 각 열은 k1석을 가지고 있으며, 이코노미 클래스는 k2석을 가지고 있다로 해석.)
=> 비행기에 있는 전 좌석의 수를 계산하라
<script>
#include <stdio.h>

int main()
{
	int business_row, business_seat, economic_row, economic_seat; // 비지니스열, 비지니스 자리, 이코노미열, 이코노미 자리로 변수 선언

	scanf("%d %d %d %d", &business_row, &business_seat, &economic_row, &economic_seat);
	printf("%d", business_row * business_seat + economic_row * economic_seat);

	return 0;
}
</script>

0개의 댓글