#include<stdio.h>
#include<string.h>
int main()
{
int sun,hour,min;
char day1[62];
char day2[62];
char time1[62];
char time2[62];
scanf("%s",day1);
scanf("%s",day2);
scanf("%s",time1);
scanf("%s",time2);
int like=0;
int i;
for(i=0;like<2;i++)
{
if(day1[i]==day2[i]&&like==0&&day1[i]>='A'&&day1[i]<='G')
{
like++;
sun=day1[i]-'A'+1;
}
else if(day1[i]==day2[i]&&like==1&&((day1[i]>='0'&&day1[i]<='9')||(day1[i]>='A'&&day1[i]<='N')))
{
if(day1[i]>='0'&&day1[i]<='9')
hour=day1[i]-'0';
else
hour=day1[i]-'A'+10;
like++;
}
}
like=0;
for(i=0;!like;i++)
{
if(time1[i]==time2[i]&&((time1[i]>='a'&&time1[i]<='z')||(time1[i]>='A'&&time1[i]<='Z')))
{
like++;
min=i;
}
}
char xiqi[8][5]={"\0","MON\0","TUE\0","WED\0","THU\0","FRI\0","SAT\0","SUN\0"};
printf("%s %02d:%02d",xiqi[sun],hour,min);
return 0;
}
1014 福尔摩斯的约会 (20 分)
最新推荐文章于 2021-01-28 17:20:55 发布