题解 2848: 基因相关性

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

基因相关性

摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main {    public static void main(String[] args……

Python数据有误

#关于Python使用长度第一个字符串无法AC的不解##使用第一个字符串长度(即s1)```pythonyu=float(input())s1=input()s2=input()res=0n=len(s1)foriinrange(n):ifs1[i]==s2[i]:res+=1q=res/nifq>=

基因相关性(两个数组的相似比例)

```c#include#include//要用到strlen函数intmain(){chara[501],b[501];floatsim;intlen,num=0;scanf("%f",&sim);//输入相似度scanf("%s",&a);//输入第一条基因scanf("%s",

基因相关性

摘要:解题思路:对应位置进行比较注意事项:参考代码:#include<iostream>#include<string>using namespace std;int main(){ double p; c……

2848: 基因相关性

摘要:解题思路:注意事项:参考代码:#include <stdio.h> #include <string.h> int main() {     char str1[505] = {0}, str……

2848: 基因相关性

解题思路:注意事项:交了三次,大概知道了这个代码的易错点首先是没有使用.strip()处理输入,如果输入包含首尾空格或换行符会影响比较其次是没有考虑两行DNA长度不一致的问题最后是我将两行字符串比较时使用了两个for循环,最好是使用一个for循环参考代码:a=float(input())b=input

好理解的解法

摘要:解题思路:注意事项:参考代码#include<stdio.h>#include<string.h>int main(){ float n;……