반응형
Notice
Recent Posts
Recent Comments
Link
«   2024/11   »
1 2
3 4 5 6 7 8 9
10 11 12 13 14 15 16
17 18 19 20 21 22 23
24 25 26 27 28 29 30
Archives
Today
Total
11-07 11:40
관리 메뉴

ImJay

[파이썬/Python] 백준 8370번 Plane 본문

Solved.ac - Python/Bronze V

[파이썬/Python] 백준 8370번 Plane

ImJay 2022. 10. 4. 16:11
반응형

[파이썬/Python] 백준 8370번 Plane

www.acmicpc.net/problem/8370

 

8370번: Plane

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.

www.acmicpc.net


문제

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.

코드

n1, k1, n2, k2 = map(int, input().split())

print(n1*k1 + n2*k2)

풀이

1. n1, k1, n2, k2 값을 입력 받습니다. ( In the first and only line of the standard input there are four integers n1k1n2 and k2 )

n1, k1, n2, k2 = map(int, input().split())

 

2. 모든 좌석의 합을 구합니다. ( calculates the sum of all seats available in that plane )

print(n1*k1 + n2*k2)

느낀 점

지금 수준으로는 코딩 문제인지 토익 문제인지 구분이 안되는데,

나중에 문제 수준이 올라가면 확실히 영어도 걸림돌이 될 것 같다.

영어 공부를 열심히 해야겠다.

 

반응형
Comments