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

15080번 - Every Second Counts 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB32361962182261.868%

문제

Meredith runs a taxi service called Ruber which offers rides to clients in small towns in western Pennsylvania. She wants to get every possible dime out of people who use her taxis, so her drivers charge a flat fee not per minute but per second. It’s important, therefore, to be able to determine the exact amount of elapsed time between the moment a client enters a cab until the moment they leave. Trying to write a program to do this has driven Meredith crazy (pun intended) so she’s come to you for some help.

입력

Input consists of two lines: the first contains the start time and the second contains the end time for a single taxi ride. Each time is of the form hh : mm : ss, giving the hour, minute and seconds. Meredith uses a 24 hour clock, with 0 : 0 : 0 representing 12 midnight and 23 : 59 : 59 representing one second before midnight. Note that the end time may have a value less than the start time value if the ride spans midnight (see the last sample test case for an example of this).

출력

Display the number of seconds between the two times. No cab ride will be equal to or longer than 24 hours.

제한

예제 입력 1

10 : 0 : 0
11 : 0 : 0

예제 출력 1

3600

예제 입력 2

13 : 30 : 52
13 : 31 : 7

예제 출력 2

15

예제 입력 3

23 : 0 : 0
1 : 30 : 0

예제 출력 3

9000

힌트

출처

ICPC > Regionals > North America > East Central North America Regional > 2017 East Central Regional Contest 연습 세션 PB번

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

출처

대학교 대회

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

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