#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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k4OjEwOjAwIEFNCTQ6MDA6MDAgUE0JNzo0NzoxNSBBTQlOCTQ6MjE6MjAgUE0JTgoyMCBPY3QgMjAyNAk4OjEwOjAwIEFNCTQ6MDA6MDAgUE0JNzo0Mjo1OSBBTQlOCTY6Mjc6MTcgUE0JTgoyMSBPY3QgMjAyNAk4OjEwOjAwIEFNCTQ6MDA6MDAgUE0JMTI6MTk6NDEgUE0JWQk1OjQ1OjQzIFBNCU4KMjIgT2N0IDIwMjQJODoxMDowMCBBTQk0OjAwOjAwIFBNCTc6NTg6NTYgQU0JTgk0OjEyOjQ5IFBNCU4KMjMgT2N0IDIwMjQJODoxMDowMCBBTQk0OjAwOjAwIFBNCTg6MDM6NTEgQU0JTgk0OjAyOjQ1IFBNCU4=
01 Oct 2024 8:10:00 AM 4:00:00 PM 7:50:28 AM N 5:45:40 PM N
02 Oct 2024 8:10:00 AM 4:00:00 PM 7:42:47 AM N 4:20:03 PM N
03 Oct 2024 8:10:00 AM 4:00:00 PM 7:45:28 AM N 4:12:13 PM N
05 Oct 2024 8:10:00 AM 4:00:00 PM 7:57:52 AM N 6:45:55 PM N
06 Oct 2024 8:10:00 AM 4:00:00 PM 7:52:54 AM N 6:31:47 PM N
07 Oct 2024 8:10:00 AM 4:00:00 PM 12:23:49 PM Y 6:48:24 PM N
08 Oct 2024 8:10:00 AM 4:00:00 PM 7:51:44 AM N 4:11:06 PM N
09 Oct 2024 8:10:00 AM 4:00:00 PM 7:48:58 AM N 4:21:25 PM N
12 Oct 2024 8:10:00 AM 4:00:00 PM 7:44:34 AM N 6:40:50 PM N
14 Oct 2024 8:10:00 AM 4:00:00 PM 12:22:19 PM Y 6:54:58 PM N
15 Oct 2024 8:10:00 AM 4:00:00 PM 7:49:05 AM N 4:16:18 PM N
16 Oct 2024 8:10:00 AM 4:00:00 PM 7:49:35 AM N 4:14:01 PM N
19 Oct 2024 8:10:00 AM 4:00:00 PM 7:47:15 AM N 4:21:20 PM N
20 Oct 2024 8:10:00 AM 4:00:00 PM 7:42:59 AM N 6:27:17 PM N
21 Oct 2024 8:10:00 AM 4:00:00 PM 12:19:41 PM Y 5:45:43 PM N
22 Oct 2024 8:10:00 AM 4:00:00 PM 7:58:56 AM N 4:12:49 PM N
23 Oct 2024 8:10:00 AM 4:00:00 PM 8:03:51 AM N 4:02:45 PM N