El campanar de la Torrassa

[image]

El Campanar de la Torrassa is the bell tower of a church of the district
of La Torrassa in the city of L’Hospitalet de Llobregat, besides
Barcelona. It is well known for continuously annoying its neighbors with
the sound of its bells. Day or night, the bells sound every quarter in
the traditional way: Suppose it is seven o’clock in the afternoon. In
this case, at 19:00 the treble bells sound four times and the bass bells
sound seven times. Then, at 19:15 the treble bells sound once. Latter,
at 19:30 the treble bells sound twice. Finally, at 19:45 the treble
bells sound thrice. Additionally, every noon the bass bells sound 100
times rather than 12 to signal the Angelus. Every time the bells start
playing, they always finish strictly within the next minute.

(In fact, this is a simplification, because on Saturdays, Sundays and
important dates extra bells are played to signal special masses, not to
count August the 15th, when bells play all day long.)

A non-governmental organization that fights against acoustic pollution
wishes to count the number of times that the bells sound in a large
amount of time. Specifically, they need a program that, given a starting
time (h:m) and a time length expressed in minutes t, computes the number
of times that the bells sound during this period.

Input

Input consists of several cases, each with three integer numbers h, m
and t. You can assume 0 ≤ h ≤ 23, 0 ≤ m ≤ 59 and 0 ≤ t ≤ 2²⁸.

Output

For every case, print the number of times that the bells sound starting
at (h:m) for a length of t minutes.

Problem information

Author: Jordi Petit

Generation: 2026-01-25T10:39:03.222Z

© Jutge.org, 2006–2026.
https://jutge.org
