You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
704 B

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#include <bits/stdc++.h>
using namespace std;
int main() {
ios::sync_with_stdio(false); //读入输出优化的强迫症
map<char, int> _map;//表示以char类型为下标存储的是int
string st;
cin >> st;//输入
int len = st.length();
_map['a'] = _map['b'] = _map['c'] = '0';//注意初始化。。。。被坑了
for (int i = 0; i < len; i += 5)
if (st[i + 3] >= '0' && st[i + 3] <= '9')//注意判断是不是0~9
_map[st[i]] = st[i + 3];//直接取出数字赋值给对应变量
else _map[st[i]] = _map[st[i + 3]];//变量之间相赋值
printf("%c %c %c", _map['a'], _map['b'], _map['c']);
//输出三个变量
return 0;
}