70分救救孩子
查看原帖
70分救救孩子
922134
jiejielove楼主2023/1/28 22:38
#include<iostream>
#include<stdio.h>
#include<math.h>
#include<iomanip>
#include<string>
using namespace std;

int main()
{
	string s;
	getline(cin, s);
	int i,j;
	char p;
	for ( i = 0; i < s.length(); i++)
	{
		p = s[i];
		for ( j = i + 1; j < s.length(); j++)
		{
			if (p == s[j])
			{
				s[i] = '-1';
				s[j] = '-1';
			}
		}
	}
	for (i = 0; i < s.length(); i++)
	{
		if (!isdigit(s[i]))
		{
			cout << s[i];
			return 0;
		}
		
	}
	cout << "no";
	return 0;
}
2023/1/28 22:38
加载中...