Logo
(追記) (追記ここまで)

27880번 - Gahui and Soongsil University station 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB13211070100382.416%

문제

Soongsil University Station is famous as the deepest station on Seoul Subway Line 7. This station is so deep that the platform is on the B6. Gahui was surprised that she did not reach the platform after more than five minutes from the exit. Gahui wants to know how deep Soongsil University station is. Find the depth of the Soongsil University station.

Depth is the vertical distance from the exit to the platform.

입력

line {floor1} {floor2}
1 F1 B1
2 B1 B2
3 B2 B5
4 B5 B6

[Table 1] Description of the given input

For every two adjacent floors ordered by depth, the information is given on a line as follows:

  • Stair x
    • If you go down x stairs from the {floor1} floor, you will reach the {floor2} floor.
  • Es x
    • If you go down the escalator with x steps from the {floor1} floor, you will reach the {floor2} floor.

출력

Print the answer in cm. If the answer is 5096cm, print 5096.

제한

  • The height of 1 escalator step is 21cm, and the height of 1 stair is 17cm.
  • The answer ≤ 6425
  • All exits are at the same elevation.
  • All platforms are atthe same elevation.
  • There is no change in elevation at the same platform.
  • x is integer.

예제 입력 1

Es 20
Stair 15
Stair 15
Stair 15

예제 출력 1

1185

힌트

출처

Contest > BOJ User Contest > 가희와 함께 하는 코딩 테스트 > 가희와 함께 하는 5회 코딩테스트 A번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /