当前位置:网站首页>1131: genetic correlation
1131: genetic correlation
2022-06-30 14:49:00 【I would, I think】
Be careful : The first is count Must be double type ,len yes int type ,m=double(count/len)
#include<string.h>
#include<iostream>
using namespace std;
int main()
{
char s1[501],s2[501];
double count;//count Must be double type
double c;
double m;
int len;
int i;
cin>>c>>s1>>s2;
len=strlen(s1);
for(i=1; i<=len; i++)
if(s1[i]==s2[i])
count++;
m=double(count/len);
if(m>=c)
cout<<"yes"<<endl;
else
cout<<"no"<<endl;
return 0;
}
Pay attention to the second :len and count Must be double type ,m=count/len perhaps m=double(count/len)
#include<string.h>
#include<iostream>
using namespace std;
int main()
{
char s1[501],s2[501];
double len,count;
double c;
double m;
int i;
cin>>c>>s1>>s2;
len=strlen(s1);
for(i=1; i<=len; i++)
if(s1[i]==s2[i])
count++;
m=count/len;
if(m>=c)
cout<<"yes"<<endl;
else
cout<<"no"<<endl;
return 0;
}
边栏推荐
- V3 01_ Welcome
- XSS challenge (1-5) more detailed answers
- 中信期货开户麻烦吗安全吗,期货开户手续费是多少,能优惠吗
- day02
- [extensive reading of papers] analyzing connections between user attributes, images, and text
- Judgment of deep learning experiment results
- @Component use cases
- PS tip: the video frame to Layer command cannot be completed because dynamiclink is not available
- IO interview questions
- [extensive reading of papers] sentimental analysis of online reviews with a hierarchical attention network
猜你喜欢

XSS challenge (1-5) more detailed answers

Sum of CCF digits (full mark code + problem solving idea) 201512-1

Computer screenshot how to cut the mouse in

After the MySQL service on the local computer is started and stopped, some services will automatically stop when they are not used by other services or programs

Knowledge learned from the water resources institute project

CCF Z-scan (full mark code + problem solving ideas) 201412-2

val_ Loss decreases first and then increases or does not decrease but only increases

KnightCTF WEB

Laravel upload error

Win10 one click Reset win10 to solve all system bugs without deleting any files and Applications
随机推荐
KnightCTF WEB
[buuctf] [actf2020 freshman competition]include
@PathVariable
Non decreasing column
Summary of C language interview questions
[extensive reading of papers] sentimental analysis of online reviews with a hierarchical attention network
[untitled]
Experiment 2: stack
[extensive reading of papers] analyzing connections between user attributes, images, and text
Learn about data kinship JSON format design from sqlflow JSON format
中信期货开户麻烦吗安全吗,期货开户手续费是多少,能优惠吗
The first dark spring cup dnuictf
Judgment of deep learning experiment results
DR-TANet: Dynamic Receptive Temporal Attention Network for Street Scene Change Detection
ThinkPHP show method parameter controllable command execution
Invalid argument during startup: Failed to open the . conf file: redis-window
Programming exercises: special numbers (problem solving ideas + code implementation)
Hbuilder most commonly used and full shortcut key set
【BUUCTF】 EasySql
Ctfshow getting started with the web (ThinkPHP topic)