What the help!
2023-12-24 20:44:52
发布于:广东
3阅读
0回复
0点赞
#include <iostream>
#include <string>
using namespace std;
int main(){
double rate;
cin >> rate;
string s1, s2;
cin >> s1 >> s2;
int len = s1.length();
int sum = 0;
for(int i = 0; i < len; i++){
if(s1[i] == s2[i]){
sum++;
}
}
if(sum * 1.0 / len >= rate){
cout << "yes";
}else{
cout << "no";
}
return 0;
}
这里空空如也
有帮助,赞一个