#include <iostream>
#include <algorithm>
#include <map>
using namespace std;
int main() {
int n;
char temp1,temp2;
map<char,int> m;
m['A']=1;m['B']=2;m['C']=3;m['D']=4;
cin>>n;
for(int i=0;i<n;i++){
for(int j=0;j<4;j++){
scanf(" %c-%c",&temp1,&temp2); //scanf会忽略前面的空行,等待第一个非空元素读入其中
if(temp2=='T'){
cout<<m[temp1];
}
}
}
system("pause");
return 0;
}
PAT 1076 Wifi密码 (15 分)
最新推荐文章于 2023-11-09 21:50:19 发布