To calculate this kind of problem, we need to divide this process into three time periods.
The first time period: 4: 00 pm on the 25th to 25: 00 pm 12 pm. Need 12-4=8 hours.
The second time period: 26th is a complete day, so there are 24 hours.
The third time period: 8 hours from 0: 00 am on the 27th to 8: 00 am on the 27th. (8-0)
8+24+8=40 hours