## Waiting

View as PDF

Points: 3 (partial)
Time limit: 2.0s
Memory limit: 16M

Authors:
Problem types
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, COBOL, CommonLisp, D, Dart, F#, Forth, Fortran, Go, Groovy, Haskell, Intercal, Java, JS, Kotlin, Lisp, Lua, Nim, ObjC, OCaml, Octave, Pascal, Perl, PHP, Pike, Prolog, Python, Racket, Ruby, Rust, Scala, Scheme, Sed, Swift, TCL, Text, Turing, VB, Zig
##### Junior 3 — Waiting

Griffy has arrived at Don Mills, but he's too early and there's no one at the school to help him with his coding! He decides to wait until school starts so he can get some pointers (see what we did there?). Given the time he arrives at and the time that school starts, determine how many seconds Griffy will need to wait.

#### Input Specification

All times will be given in the format .

First line: Time Griffy arrives (time will be less than ).

Second line: Time school starts (time will be less than or equal to ).

Note: The time school starts will be strictly greater than the time Griffy arrives.

#### Output Specification

One line, the number of seconds Griffy will need to wait.

#### Sample Input

08:15:00
08:30:00

#### Sample Output

900

• commented on Feb. 5, 2020, 1:53 p.m.

I got my case 8 wrong and I am struggling on that. Does anyone know which part I did wrong? Thank you.

• commented on Dec. 8, 2014, 9:31 p.m.

The problem mentions 23:59:59, but leap seconds can cause the last number to go up to 61.

• commented on Dec. 8, 2014, 9:35 p.m.

But since we explicitly state the constraint up to 23:59:59, we don't consider leap seconds.

• commented on Dec. 8, 2014, 7:52 p.m.

This comment is hidden due to too much negative feedback. Click here to view it.

• commented on Dec. 8, 2014, 8:08 p.m.

There's a 15 minute difference between the times. .

• commented on Dec. 9, 2014, 12:18 p.m.