PAT (Basic Level) 1076 Wifi密码

题意

按正确答案组成wifi密码。

思路

水~

代码

#include <bits/stdc++.h>
using namespace std;
int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	cout.tie(nullptr);
	int n;
	cin >> n;
	for (int i = 0; i < n; ++i) {
		for (int j = 0; j < 4; ++j) {
			string s;
			cin >> s;
			if (s[2] == 'T') cout << s[0] - 'A' + 1;
		}
	}
	cout << '\n';
	return 0;
} 

HINT

不定时更新更多题解,Basic Level 全部AC代码,详见 link ! ! !

发布了92 篇原创文章 · 获赞 16 · 访问量 3763

猜你喜欢

转载自blog.csdn.net/abcdefbrhdb/article/details/104641363
今日推荐