# include <stdio.h>
# include <string.h>
int main () {
int i, count = 0;
char pw1[100],pw2[100],pw3[100],pw4[100];
gets (pw1);
gets (pw2);
// gets (pw3);
// gets (pw4);
for (i = 0; i < strlen(pw1); i++) {
if (pw1[i]==pw2[i]&&count==0) {
if (pw1[i]=='A') {
printf("MON ");
count++;
continue;
}
if (pw1[i]=='B') {
printf("TUE ");
count++;
continue;
}
if (pw1[i]=='C') {
printf("WED ");
count++;
continue;
}
if (pw1[i]=='D') {
printf("THU ");
count++;
continue;
}
if (pw1[i]=='E') {
printf("FRI ");
count++;
continue;
}
if (pw1[i]=='F') {
printf("SAT ");
count++;
continue;
}
if (pw1[i]=='G') {
printf("SUN ");
count++;
continue;
}
}
if (pw1[i]==pw2[i]&&count==1) {
if (pw1[i]<='9'&&pw1[i]>='0') {
printf("0%c",pw1[i]);
count++;
}
if (pw1[i]<='N'&&pw1[i]>='A') {
printf("%d",pw1[i]-'A'+10);
count++;
}
}
}
return 0;
}
pat1014
最新推荐文章于 2024-11-16 13:27:03 发布