题解列表

筛选

运用字符串求解

摘要:解题思路:  用字符串的特点,  使输入的数字转化为字符串存储,   再用length函数限制输入位数,   最后用字符串下标输出注意事项: 参考代码:#include<iostream> usin……

蓝桥杯2024年第十五届决赛真题-数位翻转

摘要:解题思路:这道题目可以用动态规划来解决,主要步骤如下:1.定义状态:dp[i][j][0] 表示前 i 个数中恰好选择 j 个区间,且第 i 个数没有翻转时的最大和。dp[i][j][1] 表示前 i……

编写题解 2777: 计算2的幂

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

编写题解 2805: 乘方计算

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

2777:计算2的幂

摘要:解题思路:循环注意事项:变量参考代码:#include <bits/stdc++.h>using namespace std;int main(){    int i,n,sum;    sum=1;……

2805: 乘方计算

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

ddddgggggggggggggggggggggggggggcb

摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){    int k,sum1=0 ,sum5=0,sum10=……

编写题解 2803: 整数的个数

摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){    int k,sum1=0,sum5=0,sum10=……