total number of beats in 24 hours if the rate is 42 beats in 30 sec.

If 42 beats in 30 s then 84 beats per minute or 84 beats min^-1

Number of minutes in a day is

24 h x 60 minutes h^-1

so number of beats is

24 h x 60 min h^-1 x 84 beats min^-1