leoql


私信TA

用户名:17105150054

访问量:5710

签 名:

programming is the most fun you can have with your clothes on.

等  级
排  名 2920
经  验 2024
参赛次数 0
文章发表 20
年  龄 0
在职情况 学生
学  校 HNCA
专  业 CS

  自我简介:

解题思路:

注意事项:

参考代码:

/*
	//输入2字符串
	//枚举相同字符串(参考字符串为外循环,修改字符串是内循环)
	//较长字符串长度-相同字符数量
	
*/
#include <cstdio>
#include <algorithm>
#include <iostream>
#include <cstring>
using namespace std;

int main(){
	char ch1[205];
	char ch2[205];
	gets(ch1);
	gets(ch2);
	int cnt=0;
	for(int i=0;i<strlen(ch2);i++){
		for(int j=0;j<strlen(ch1);j++){
			if(ch2[i]==ch1[j])
			cnt++;
		}
	}	
	
	cout<<strlen(ch1)-cnt;
	return 0;
}


 

0.0分

0 人评分

看不懂代码?想转换其他语言的代码? 或者想问其他问题? 试试问问AI编程助手,随时响应你的问题:

编程语言转换

万能编程问答  

代码解释器

代码纠错

SQL生成与解释

  评论区