#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+PnN0cltpXTsKICAgICAgICB0dGwgKz0gY2xjKHN0clsxMF0sc3RyWzExXSkgLSBjbGMoc3RyWzddLHN0cls4XSk7CiAgICB9CgogICAgaW50IGF2ZyA9IHR0bCAvIGRheXM7CgogICAgY291dDw8IlRvdGFsIEF0dGVuZGFuY2UgOiAiPDxkYXlzPDwiIERheXMiPDxlbmRsPDxlbmRsOwoKCiAgICBpbnQgaG91ciA9IHR0bCAvIDM2MDA7ICAgICAgdHRsICU9IDM2MDA7CiAgICBpbnQgbWludXRlID0gdHRsIC8gNjA7ICAgICAgdHRsICU9IDYwOwogICAgY291dDw8IlRvdGFsIE9mZmljZSBUaW1lIDogIjw8ZW5kbDsKICAgIGNvdXQ8PCIgICAgICAgICAgICAgICAgICAgICI8PGhvdXI8PCIgSG91cnMgIjw8bWludXRlPDwiIE1pbnV0ZXMgIjw8dHRsPDwiIFNlY29uZHMiPDxlbmRsPDxlbmRsOwoKICAgIGludCBoID0gYXZnIC8gMzYwMDsgICAgIGF2ZyAlPSAzNjAwOwogICAgaW50IG0gPSBhdmcgLyA2MDsgICAgICAgYXZnICU9IDYwOwogICAgaW50IHMgPSBhdmc7CiAgICBjb3V0PDwiQXZlcmFnZSBUaW1lIFBlciBEYXkgOiAiPDxlbmRsOwogICAgY291dDw8IiAgICAgICAgICAgICAgICAgICAgICAgIjw8aDw8IiBIb3VycyAiPDxtPDwiIE1pbnV0ZXMgIjw8czw8IiBTZWNvbmRzIjw8ZW5kbDw8ZW5kbDsKCgp9Cg==
stdin
MTYgT2N0IDIwMjQJODoxMDowMCBBTQk0OjAwOjAwIFBNCTc6NDk6MzUgQU0JTgk0OjE0OjAxIFBNCU4KMTkgT2N0IDIwMjQJODoxMDowMCBBTQk0OjAwOjAwIFBNCTc6NDc6MTUgQU0JTgk0OjIxOjIwIFBNCU4KMjAgT2N0IDIwMjQJODoxMDowMCBBTQk0OjAwOjAwIFBNCTc6NDI6NTkgQU0JTgk2OjI3OjE3IFBNCU4KMjEgT2N0IDIwMjQJODoxMDowMCBBTQk0OjAwOjAwIFBNCTEyOjE5OjQxIFBNCVkJNTo0NTo0MyBQTQlOCjIyIE9jdCAyMDI0CTg6MTA6MDAgQU0JNDowMDowMCBQTQk3OjU4OjU2IEFNCU4JNDoxMjo0OSBQTQlOCjIzIE9jdCAyMDI0CTg6MTA6MDAgQU0JNDowMDowMCBQTQk4OjAzOjUxIEFNCU4JNDowMjo0NSBQTQlO
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