80分!?
查看原帖
80分!?
1103166
Ly145666楼主2024/5/17 13:59
#include<bits/stdc++.h>
using namespace std;
double x,y=0.0,z;
string a;
int main()
{
	string k,l;
	cin>>z;
	cin>>k>>l;
	y=1.0/k.size();
	x=0;
	for(int i=0;i<k.size();i++)
	{
		if(k[i]==l[i])
		{
			x+=y;
		}
		else
		    x=x-y;
	}if(x>=z)
	{
		cout<<"yes";
	}
	else
	    cout<<"no";
 } 
 
 

求助!!

2024/5/17 13:59
加载中...