分值 : 20 难度 : 简单题 思路 : 阅读理解题啊!我去 坑点 : 你要读懂题目要求才能ac,这什么垃圾题目 评语 : 阅读理解题,没水平但就是搞歧义,恶心死你!
1234567891011121314151617181920212223242526272829303132333435363738394041424344
#include <iostream>using namespace std ;string db[7]= {"MON","TUE","WED","THU","FRI","SAT","SUN"};int main() { string s1, s2 ,s3, s4; cin >> s1 >> s2 >>s3 >>s4 ; int flag = 0 ; int flag1 = 0 ; int c1 ,c2 ,c3; for(int i = 0 ; i <s1.size() && i < s2.size() ; i++) { if( s1[i]!=s2[i] ) continue; if(flag==0 && (s1[i] >='A' && s1[i] <='G') ) { flag =1 ; c1 = s1[i] -'A' ; } else if(flag && !flag1){ if( (s1[i] >='0' && s1[i] <='9')|| (s1[i] >='A' && s1[i] <='N') ) { if (s1[i] >= '0' && s1[i] <= '9') c2 = s1[i] - '0'; if (s1[i] >= 'A' && s1[i] <= 'N') c2 = s1[i] - 'A' + 10; flag1 = 1 ; } } else if(flag && flag1) break; } for(int i = 0 ; i <s3.size() && i < s4.size() ; i++) { if(s3[i] != s4[i]) continue; if( s3[i]==s4[i]&& (s3[i] >='A' && s3[i]<='Z' || s3[i] >='a' && s3[i]<='z')) { c3 = i ;break ; } } cout << db[c1]<<" "; printf("%02d:%02d\n",c2,c3) ;}