当前位置:网站首页>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;
}
边栏推荐
- 2021-07-15Caused by: org. quartz. ObjectAlreadyExistsException: Unable to store Job : ‘DEFAULT. TASK_ 1‘
- Steps for commissioning of vertical machining center
- PHP 2D array change key name
- [extensive reading of papers] multi modal sarcasm detection and human classification in code mixed conversations
- [extensive reading of papers] multimodal attribute extraction
- DB2 SQL Error: SQLCODE=-206, SQLSTATE=42703
- Greedy interval problem (5)
- Laravel upload error
- Win10 one click Reset win10 to solve all system bugs without deleting any files and Applications
- KnightCTF WEB
猜你喜欢

Component communication mode

August 24, 2021 deque queue and stack
![[buuctf] [geek challenge 2019] secret file](/img/00/23bebd013eb4035555c0057725e3c4.jpg)
[buuctf] [geek challenge 2019] secret file
![[buuctf] [actf2020 freshman competition]include](/img/42/50439290177fdea5f431e315cac1a1.jpg)
[buuctf] [actf2020 freshman competition]include

ThinkPHP v3.2 comment annotation injection write shell

day02

Detailed explanation of settimeout() and setinterval()

PS cutting height 1px, Y-axis tiling background image problem

PS tip: the video frame to Layer command cannot be completed because dynamiclink is not available

How to realize selective screen recording for EV screen recording
随机推荐
【BUUCTF】 EasySql
Uniapp upload image method
Add attributes to multimode
高精度CNC加工中心为什么会出现误差?这4个原因你要注意!
catkin_ Make reports an error, transfers the location of the workspace, and uses other people's workspace files to cause compilation errors
In situ merging of two arrays with two pointers
Double pointer letter matching
JS array sorting method summary
2021-05-12
Pseudocode writing specification
MV3 04_ Introducing Manifest V3
Laravel8 custom log directory, rename
August 24, 2021 deque queue and stack
Repair of incorrect deletion of win10 boot entry
【BUUCTF】[GXYCTF2019]Ping Ping Ping1
Finding the root of an integer by dichotomy
Binary rotation array (2)
Basic learning notes of C language
Maximum area of islands searched
One dimensional and two dimensional array addresses