题库 信息学奥赛题库 题目列表 阅读程序写结果:#include<iostream>using name...
填空题

阅读程序写结果:


#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;

    return 0;

}

输入:xyzxyw

输出:_________

题目信息
2017年 初赛
-
正确率
0
评论
77
点击