题解列表

筛选

猴子吃桃简单for循环

摘要:解题思路:用数学方法反推发现每天猴子能吃的桃子数的规律,第一天为1个,记为x,第二天为(1+1)*2=4个,x的新值为4,第三天为(4+1)*2=10个,以此类推注意事项:参考代码#include<s……

自定义函数之数字分离

摘要:解题思路:注意事项:参考代码:#include<stdio.h>#include<string.h>int fun(char a[],char b[]){    int i=0,j=0;    whi……

2968: 区间内的真素数

摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;int ss(int x){//判断是否为素数    if(x<2)    {       ……

区间内的真素数

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;bool zs(int x){    if(x<2)    {        re……

2950: 素数回文数的个数

摘要:解题思路:注意事项:参考代码:#include <iostream>using namespace std;//判断是否为素数int ss(int x){    if(x<2)    {       ……

斐波那契(动规)

摘要:解题思路:按照动规五部曲:定义动规数组和数组下标的含义:dp[i]表示:dp数组中第i个菲波那契数的值   2.确定递推公式:                                dp[i]……