python二分法求函数零点 摘要:参考代码:def compute(x): return pow(x,5)-15*pow(x,4)+85*pow(x,3)-225*pow(x,2)+274*x-121def num(l,r): …… 题解列表 2023年01月17日 0 点赞 0 评论 799 浏览 评分:9.9
python通过位运算计算二进制中1的数量 摘要:解题思路:#返回n的最后一位1def lowbit(x): return x&(-x)参考代码:l,r=map(int,input().split())def lowbit(n): ret…… 题解列表 2023年01月17日 0 点赞 0 评论 628 浏览 评分:9.9
python位运算解二进制分类1的个数相关问题 摘要:解题思路:lowbit函数用于返回n的最后一位1参考代码:def lowbit(n): return n&(-n)a=0b=0for i in range(1,1001): j=0 …… 题解列表 2023年01月17日 0 点赞 0 评论 663 浏览 评分:9.9
基因相关性(两个数组的相似比例) ```c#include#include//要用到strlen函数intmain(){chara[501],b[501];floatsim;intlen,num=0;scanf("%f",&sim);//输入相似度scanf("%s",&a);//输入第一条基因scanf("%s", 题解列表 2023年01月17日 0 点赞 4 评论 930 浏览 评分:9.9
二级C语言-公约公倍 (用c写的) 简单步骤!!!!! #includeintgcd(intc,intd){if(c%d==0)returnd;elsegcd(d,c%d);}intmain(){inta,b,num1,num2;scanf("%d%d",&a,&b);if(a>b){num1=gcd(a, 题解列表 2023年01月17日 0 点赞 0 评论 694 浏览 评分:9.9
利用ceil(向上取整函数)即可简单解决 摘要:解题思路:利用ceil(向上取整函数)注意事项:参考代码:#include<stdio.h>#include<math.h>int main(){int n,t;char ch;scanf("%d %…… 题解列表 2023年01月17日 0 点赞 0 评论 768 浏览 评分:9.9
矩阵转置(超级简单) 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a[100][100]; int n,i,j; scanf("%d",&n…… 题解列表 2023年01月17日 0 点赞 0 评论 987 浏览 评分:9.9
1116: IP判断(python) 摘要:解题思路:1、EOF即为"End of file"缩写2、四个整数中不允许有前导零存在:即当数字长度大于一位时(0是可以的),第一位为0的数都是含有前导零的数参考代码:while True: t…… 题解列表 2023年01月17日 0 点赞 0 评论 822 浏览 评分:9.9
明明的随机数(水题) 摘要:```c #include int main(){ int n,i,j,k=0,a[101],b[101],t; scanf("%d",&n); for(i=0;i…… 题解列表 2023年01月18日 0 点赞 0 评论 562 浏览 评分:9.9
数列(水题,测试数据有问题) ```c#includelonglongpower(intk,intj){longlongans=1;while(j){ans*=k;j--;}returnans;}intmain(){intk,n,i,j,r[1000],cnt=0;intsum=0;//我一开始用longlong居然不对, 题解列表 2023年01月18日 0 点赞 0 评论 715 浏览 评分:9.9