[递归]母牛的故事(动态规划,递归) 摘要:解题思路:写出数学表达式 F(x){ x<=3 f(x)=x;// 前三年只有一头母牛生孩子 &nbs 题解列表 2024年04月27日 0 点赞 0 评论 506 浏览 评分:6.0
编写题解 1035: [编程入门]自定义函数之字符类型统计 摘要:解题思路:注意事项:参考代码:#include<stdio.h> #include<stdlib.h> #include<string.h> void count(char* str,int* …… 题解列表 2024年05月13日 0 点赞 0 评论 381 浏览 评分:6.0
求长方形面积 摘要:参考代码:#include<stdio.h>int main(){ int a,b; int C=0,S=0; scanf("%d%d",&a,&b); C=2*(a+b); S=a*b; print…… 题解列表 2024年05月24日 0 点赞 1 评论 1152 浏览 评分:6.0
测试数据有问题 摘要:错误样例样例:33 1 0预期:2实际:3注意事项:参考代码:贴上代码:right方法是错误的import java.util.Arrays; import java.util.Random; i…… 题解列表 2024年05月30日 2 点赞 0 评论 660 浏览 评分:6.0
全网最简单思路,简单代码+排序相除即可 摘要:解题思路:首先求等比数列最大比例,题目会给出一个等比数列的子序列。1、先从大到小排序,然后计算每一项与后一项的比例,取最小的比例就是题目要求的了。证明很简单,任意项之间的比值都为q^x,只要找到都能满…… 题解列表 2024年05月31日 0 点赞 0 评论 495 浏览 评分:6.0
编写题解 1267: A+B Problem 摘要:解题思路:注意事项:参考代码:#includeusing namespace std;int main(){ int a,b; cin>>a>>b; cout<<a+b; re…… 题解列表 2024年06月09日 0 点赞 0 评论 812 浏览 评分:6.0
斐波那契数列 摘要:解题思路:用一个变量存储上一个数注意事项:无参考代码: #includde<stdio.h> int main(){ int n; int t; in…… 题解列表 2024年06月19日 0 点赞 0 评论 447 浏览 评分:6.0
求矩形面积 摘要:解题思路:通过输入矩形边长,带入公式,计算矩形面积注意事项:输入为数参考代码:#include<stdio.h>int main(){ int a,b,c; scanf("%d%d",&a…… 题解列表 2024年06月21日 0 点赞 0 评论 776 浏览 评分:6.0
Java学习小练习 摘要:解题思路:注意事项:将println方法改为printf方法,输出的类型为double,记得约9位小数参考代码:import java.util.Scanner;public class Main {…… 题解列表 2024年07月06日 0 点赞 0 评论 481 浏览 评分:6.0
Devc++来写奇数单增序列 摘要:解题思路:注意事项:参考代码:#include <stdio.h>void sort(int odds[],int length);int main(){int N=0;int i=0;scanf("…… 题解列表 2024年07月12日 0 点赞 0 评论 600 浏览 评分:6.0