#include int main(void){ int i,n,H[30],M[30],h[30],m[30],sum=0; scanf("%d",&n); for(i=0;ih[i]){ h[i]=h[i]+24; }else if(H[i]==h[i] && M[i]>m[i]){ h[i]=h[i]+24; } sum = sum+ (h[i]*60+m[i]) - (H[i]*60+M[i]) ; // printf("%d\n",sum); } printf("%d\n",sum); // for(i=0;i