题解列表

筛选

猴子吃桃的问题(c语言)

摘要:注意事项:猴子是先吃一半再吃一个,所以我们需要先加一个再乘二。参考代码:#include <stdio.h> int main(){ int n,sum=1; scanf("%d",&n);……

迭代法求平方根(c语言)

摘要:解题思路和注意事项:迭代法公式:求a的平方根的迭代公式为: X[n+1]=(X[n]+a/X[n])/2 要求前后两次求出的差的绝对值少于0.00001。迭代法是不断重复,每次迭代出的值是不断逼近所求……

自定义函数之字符提取

摘要:解题思路:注意事项:参考代码:def tiqu(a):    for i in a:        if i in b:            print(i,end=&#39;&#39;)a = i……

自定义函数之数字分离

摘要:解题思路:注意事项:参考代码:def fenli(a):    for i in a:        print(i,end=&#39; &#39;)a = input()fenli(a)……

编写题解 2810: 鸡尾酒疗法

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int n,a,b;  cin>>n; float x,y;……

1103开心的金明(dp动态规划)

摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;const int S = 28;int M;//拥有的钱int N;//需要买的物品数int……

自定义函数之字符类型统计

摘要:解题思路:注意事项:参考代码:def tongji(m):    a,b,c,d = 0,0,0,0    for i in m:        if i.isalpha():            ……

C语言—小白易懂版本

摘要:解题思路:看代码即可注意事项:参考代码:#include<stdio.h> int fun(int n) {      if (n <= 3)return n;      else  re……