#include<stdio.h>#include<stdlib.h>#include<string.h>#include<ctype.h>#include<algorithm>Usingnamespace Std;Char g1[99],g2[99],g3[99],g4[99];Char alp[7][5]={"MON","TUE","WED","THU","FRI","Sat","SUN"};int main () {scanf ("%s", G1); scanf"%s", G2); scanf"%s", G3); scanf"%s", G4);int Len1=strlen (G1);int Len2=strlen (G2);int Len3=strlen (G3);int Len4=strlen (G4);int minlen=min (LEN1,LEN2);int i;for (i=0; I<minlen; ++i)Find the week {if (G1[i]==g2[i] && g1[i]>=' A ' && g1[i]<=' G ') {printf ("%s", alp[g1[i]-' A ']);"Skill"-' A ' becomes a number starting from 0Break } }for (++i; i<minlen; ++i)Find an hour {if (G1[i]==g2[i]) {if (g1[i]>=' A ' && g1[i]<=' N ') {printf ("%02d:", g1[i]-' A ' +10);"Caution"-' a ' after starting from 0, and A for 10, do not forget +10Break }else if (g1[i]>= ' 0 ' && G1[i]<= ' 9 ') {printf ( "%02d:", G1[i]- ' 0 '); break;} }} minlen=min (LEN3,LEN4); for (int i=0; i<minlen; ++i) //find minutes {if (g3[i]==g4[i] && isalpha (g3[i]) //same To determine if the letter {printf ( "%02d break;} } //system ("pause"); return 0;}
pat:1014. Sherlock Holmes's appointment (a) AC