aaaa___ @ 2018-10-07 16:24:47
#include <iostream>
using namespace std;
int main() {
int t[256];
string s;
int i;
cin >> s;
for (i = 0; i < 256; i++)
t[i] = 0;
for (i = 0; i < s.length(); i++)
t[s[i]]++;//这里是啥意思啊
for (i = 0; i < s.length(); i++)
if (t[s[i]] == 1) {
cout << s[i] << endl;
return 0;
}
cout << "no" << endl;
by 苏钦云 @ 2018-10-07 16:45:31
@苏钦云
那么s[i]就是第i位的字符呗
by aaaa___ @ 2018-10-07 16:52:06
@苏钦云 哦哦!谢谢!那能不能帮忙解释一下这个程序·-·不太懂。。谢谢大佬。
by aaaa___ @ 2018-10-07 16:57:13
@苏钦云 看懂了看懂了·-·不用解释了!谢谢