Skip to content

Commit 8886cc2

Browse files
committed
[Bronze V] Title: Plane, Time: 8 ms, Memory: 69104 KB -BaekjoonHub
1 parent 033c3e9 commit 8886cc2

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
let n1k1n2k2 = readLine()!.split { $0 == " " }.map { Int(String($0))! }
2+
print(n1k1n2k2[0]*n1k1n2k2[1] + n1k1n2k2[2]*n1k1n2k2[3])
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# [Bronze V] Plane - 8370
2+
3+
[문제 링크](https://www.acmicpc.net/problem/8370)
4+
5+
### 성능 요약
6+
7+
메모리: 69104 KB, 시간: 8 ms
8+
9+
### 분류
10+
11+
사칙연산, 수학
12+
13+
### 제출 일자
14+
15+
2025년 2월 22일 20:16:16
16+
17+
### 문제 설명
18+
19+
<p>Byteland Airlines recently extended their aircraft fleet with a new model of a plane. The new acquisition has <em>n</em><sub>1</sub> rows of seats in the business class and <em>n</em><sub>2</sub> rows in the economic class. In the business class each row contains <em>k</em><sub>1</sub> seats, while each row in the economic class has <em>k</em><sub>2</sub> seats.</p>
20+
21+
<p>Write a program which:</p>
22+
23+
<ul>
24+
<li>reads information about available seats in the plane,</li>
25+
<li>calculates the sum of all seats available in that plane,</li>
26+
<li>writes the result.</li>
27+
</ul>
28+
29+
### 입력
30+
31+
<p>In the first and only line of the standard input there are four integers <em>n</em><sub>1</sub>, <em>k</em><sub>1</sub>, <em>n</em><sub>2</sub> and <em>k</em><sub>2</sub> (1 ≤ <em>n</em><sub>1</sub>, <em>k</em><sub>1</sub>, <em>n</em><sub>2</sub>, <em>k</em><sub>2</sub> ≤ 1 000), separated by single spaces.</p>
32+
33+
### 출력
34+
35+
<p>The first and only line of the standard output should contain one integer - the total number of seats available in the plane.</p>
36+

0 commit comments

Comments
 (0)