#include<bits/stdc++.h>
using namespace std;
int clc( string tm ,string zone)
{
int sum = 0 ;
if ( zone == "PM" ) {
if ( tm [ 0 ] ! = '1' && tm [ 1 ] ! = '2' ) sum = 12 * 3600 ;
}
int s = 0 ,d= 3600 ;
for ( int i= 0 ; i< tm .size ( ) ; i++ ) {
if ( tm [ i] == ':' ) {
sum + = s * d;
d / = 60 ;
s = 0 ;
}
else s = ( s* 10 ) + tm [ i] - '0' ;
}
sum + = s;
return sum;
}
int main( )
{
string str[ 200 ] ;
int ttl = 0 ,days= 0 ;
while ( cin >> str[ 0 ] ) {
days++ ;
for ( int i= 1 ; i<= 12 ; i++ ) cin >> str[ i] ;
ttl + = clc( str[ 10 ] ,str[ 11 ] ) - clc( str[ 7 ] ,str[ 8 ] ) ;
}
int avg = ttl / days;
cout << "Total Attendance : " << days<< " Days" << endl<< endl;
int hour = ttl / 3600 ; ttl % = 3600 ;
int minute = ttl / 60 ; ttl % = 60 ;
cout << "Total Office Time : " << endl;
cout << " " << hour<< " Hours " << minute<< " Minutes " << ttl<< " Seconds" << endl<< endl;
int h = avg / 3600 ; avg % = 3600 ;
int m = avg / 60 ; avg % = 60 ;
int s = avg;
cout << "Average Time Per Day : " << endl;
cout << " " << h<< " Hours " << m<< " Minutes " << s<< " Seconds" << endl<< endl;
}
I2luY2x1ZGU8Yml0cy9zdGRjKysuaD4KCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgoKaW50IGNsYyhzdHJpbmcgdG0sc3RyaW5nIHpvbmUpCnsKICAgIGludCBzdW0gPSAwOwoKICAgIGlmKHpvbmUgPT0gIlBNIil7CiAgICAgICAgaWYodG1bMF0gIT0gJzEnICYmIHRtWzFdICE9ICcyJykgc3VtID0gMTIqMzYwMDsKICAgIH0KCiAgICBpbnQgcyA9IDAsZD0zNjAwOwogICAgZm9yKGludCBpPTA7aTx0bS5zaXplKCk7aSsrKXsKICAgICAgICBpZih0bVtpXT09JzonKXsKICAgICAgICAgICAgc3VtICs9IHMgKiBkOwogICAgICAgICAgICBkIC89IDYwOwogICAgICAgICAgICBzID0gMDsKICAgICAgICB9CiAgICAgICAgZWxzZSBzID0gKHMqMTApICsgdG1baV0tJzAnOwogICAgfQogICAgc3VtICs9IHM7CiAgICByZXR1cm4gIHN1bTsKfQppbnQgbWFpbigpCnsKCiAgICBzdHJpbmcgc3RyWzIwMF07CiAgICBpbnQgdHRsID0gMCxkYXlzPTA7CgogICAgd2hpbGUoY2luPj5zdHJbMF0pewogICAgICAgIGRheXMrKzsKICAgICAgICBmb3IoaW50IGk9MTtpPD0xMjtpKyspICBjaW4+PnN0cltpXTsKICAgICAgICB0dGwgKz0gY2xjKHN0clsxMF0sc3RyWzExXSkgLSBjbGMoc3RyWzddLHN0cls4XSk7CiAgICB9CgogICAgaW50IGF2ZyA9IHR0bCAvIGRheXM7CgogICAgY291dDw8IlRvdGFsIEF0dGVuZGFuY2UgOiAiPDxkYXlzPDwiIERheXMiPDxlbmRsPDxlbmRsOwoKCiAgICBpbnQgaG91ciA9IHR0bCAvIDM2MDA7ICAgICAgdHRsICU9IDM2MDA7CiAgICBpbnQgbWludXRlID0gdHRsIC8gNjA7ICAgICAgdHRsICU9IDYwOwogICAgY291dDw8IlRvdGFsIE9mZmljZSBUaW1lIDogIjw8ZW5kbDsKICAgIGNvdXQ8PCIgICAgICAgICAgICAgICAgICAgICI8PGhvdXI8PCIgSG91cnMgIjw8bWludXRlPDwiIE1pbnV0ZXMgIjw8dHRsPDwiIFNlY29uZHMiPDxlbmRsPDxlbmRsOwoKICAgIGludCBoID0gYXZnIC8gMzYwMDsgICAgIGF2ZyAlPSAzNjAwOwogICAgaW50IG0gPSBhdmcgLyA2MDsgICAgICAgYXZnICU9IDYwOwogICAgaW50IHMgPSBhdmc7CiAgICBjb3V0PDwiQXZlcmFnZSBUaW1lIFBlciBEYXkgOiAiPDxlbmRsOwogICAgY291dDw8IiAgICAgICAgICAgICAgICAgICAgICAgIjw8aDw8IiBIb3VycyAiPDxtPDwiIE1pbn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k3OjQxOjAzIEFNCU4JNDoxNzoxMCBQTQlOCjA0IEphbiAyMDI1CTg6MTA6MDAgQU0JNDowMDowMCBQTQk4OjM1OjM1IEFNCVkJMzo1MjoxOSBQTQlZCjA1IEphbiAyMDI1CTg6MTA6MDAgQU0JNDowMDowMCBQTQk3OjQwOjEzIEFNCU4JNTozODozNyBQTQlO
18 Dec 2024 8:10:00 AM 4:00:00 PM 7:36:06 AM N 4:14:59 PM N
19 Dec 2024 8:10:00 AM 4:00:00 PM 12:55:07 PM Y 6:44:35 PM N
21 Dec 2024 8:10:00 AM 4:00:00 PM 7:41:06 AM N 6:22:01 PM N
22 Dec 2024 8:10:00 AM 4:00:00 PM 7:39:07 AM N 3:32:55 PM Y
23 Dec 2024 8:10:00 AM 4:00:00 PM 7:44:15 AM N 5:57:58 PM N
24 Dec 2024 8:10:00 AM 4:00:00 PM 7:42:03 AM N 4:36:25 PM N
26 Dec 2024 8:10:00 AM 4:00:00 PM 7:41:27 AM N 4:13:48 PM N
28 Dec 2024 8:10:00 AM 4:00:00 PM 7:41:31 AM N 4:14:40 PM N
29 Dec 2024 8:10:00 AM 4:00:00 PM 7:41:00 AM N 4:14:48 PM N
30 Dec 2024 8:10:00 AM 4:00:00 PM 7:39:15 AM N 4:16:29 PM N
31 Dec 2024 8:10:00 AM 4:00:00 PM 7:40:15 AM N 4:18:33 PM N
01 Jan 2025 8:10:00 AM 4:00:00 PM 7:41:23 AM N 4:19:13 PM N
02 Jan 2025 8:10:00 AM 4:00:00 PM 7:41:03 AM N 4:17:10 PM N
04 Jan 2025 8:10:00 AM 4:00:00 PM 8:35:35 AM Y 3:52:19 PM Y
05 Jan 2025 8:10:00 AM 4:00:00 PM 7:40:13 AM N 5:38:37 PM N