• 沒有找到結果。

To make it worse, she has deep sleep, and a difficult time to wake up using alarm clocks

N/A
N/A
Protected

Academic year: 2021

Share "To make it worse, she has deep sleep, and a difficult time to wake up using alarm clocks"

Copied!
1
0
0

加載中.... (立即查看全文)

全文

(1)

11677 Alarm Clock

Daniela is a nurse in a large hospital, which causes her working shifts to constantly change. To make it worse, she has deep sleep, and a difficult time to wake up using alarm clocks.

Recently she got a digital clock as a gift, with several different options of alarm sounds, and she has hope that it might help solve her problem. But, lately, she’s been very tired and want to enjoy every single moment of rest. So she carries her new clock to every place she goes, and whenever she has some spare time, she tries to sleep, setting her alarm clock to the time when she needs to wake up. But, with so much anxiety to sleep, she ends up with some difficulty to fall asleep and enjoy some rest.

A problem that has been tormenting her is to know how many minutes of sleep she would have if she felt asleep immediately and woken up when the alarm clock ringed. But she is not very good with numbers, and asked you for help to write a program that, given the current time and the alarm time, find out the number of minutes she could sleep.

Input

The input contains several test cases. Each test case is described in one line, containing four integers H1, M1, H2 and M2, with H1: M1 representing the current hour and minute, and H2: M2 representing the time (hour and minute) when the alarm clock is set to ring (0≤ H1 ≤ 23, 0 ≤ M1 ≤ 59, 0 ≤ H2≤ 23, 0≤ M2 ≤ 59).

The end of the input is indicated by a line containing only four zeros, separated by blank spaces.

Output

For each test case, your program must print one line, containing a single integer, indicating the number of minutes Daniela has to sleep.

Sample Input 1 5 3 5 23 59 0 34 21 33 21 10 0 0 0 0

Sample Output 120

35 1417

參考文獻

相關文件

She argues that one could use the following portfolio to obtain arbitrage profit: Long one call option with strike price 40; short three call options with strike price 50; lend

why he/she is doing it before even starting work Unwittingly working on a previously.

Not a simple transitory or rotary motion but several motions of different types, speeds, and amplitudes composing to make a resultant whole, just as one can compose colors, or

• Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It

It has been well-known that, if △ABC is a plane triangle, then there exists a unique point P (known as the Fermat point of the triangle △ABC) in the same plane such that it

It takes 20 cm of ribbon to make a bowknot which is 0.05 m less than a corsage?. Mary has a ribbon of 8

He(She) has a round face and two small eyes.. Are there

To encourage Sharon, her mom told her “if you can get good grades, I will give you a surprise.” So, Sharon had studied math all night and she also hadn’t slept well last week..