#include<bits/stdc++.h>
using namespace std;
int main()
{
#ifdef ONLINE_JUDGE
#else
freopen("in.txt","r",stdin);
#endif
string hash[7]={"MON","TUE","WED","THU","FRI","SAT","SUN"};
string s1,s2,s3,s4;
cin>>s1>>s2>>s3>>s4;
int lenn=min(s1.length(),s2.length());
int cnt=0;
string temp;
for(int i=0;i<lenn;i++){
if(s1[i]==s2[i]&&(s1[i]>='A'&&s1[i]<='G')&&(s2[i]>='A'&&s2[i]<='G')){
temp=temp+s2[i];cnt=i;break;
}
}
for(int i=cnt+1;i<lenn;i++){
if(s1[i]==s2[i]&&((s1[i]>='A'&&s1[i]<='N')||isdigit(s1[i]))){
temp=temp+s2[i];break;
}
}
int k=temp[0]-'A';
cout<<hash[k]<<' ';
int ttt;
if(isdigit(temp[1])) ttt=temp[1]-'0';
else ttt=temp[1]-'A'+10;
printf("%02d:",ttt);
int ans=0;
int len=min(s3.length(),s4.length());
for(int i=0;i<len;i++){
if((s3[i]==s4[i])&&(isalpha(s3[i]))){
ans=i;break;
}
}
printf("%02d",ans);
return 0;
}
这大概是我做的最恶心的一道题目了,题意不明,测试点更不靠谱