题库 信息学奥赛题库 题目列表 NOIP 2017普及组初赛试题 阅读程序写结果:#include&lt...
填空题

NOIP 2017普及组初赛试题 阅读程序写结果:

#include<iostream>
using namespacestd;
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;
    return 0;
}

输入: xyzxyw 

输出: ____

题目信息
2017年 初赛 阅读程序
-
正确率
0
评论
125
点击