pow默认输出double,如果题目要求整数需要int强制转换 摘要:解题思路:用pow函数的注意是,即使是两个int运算得到的pow结果也默认为double。而题目中要求,给出整数结果,就必须在输出前(int)强制转换。参考代码:#include<iostream>#…… 题解列表 2024年12月02日 0 点赞 0 评论 330 浏览 评分:0.0
蓝桥杯算法训练VIP-链表数据求和操作 简单 明了!!! 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ int a1[11],a2[11],c1=…… 题解列表 2024年12月01日 0 点赞 0 评论 334 浏览 评分:0.0
[编程入门]链表合并 链表是什么? 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义一个结构体sss,包含两个整数成员x和y struct sss{…… 题解列表 2024年12月01日 1 点赞 0 评论 487 浏览 评分:0.0
二叉树遍历(flist) 递归 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 定义两个字符串变量 string s1, s2; void kkk…… 题解列表 2024年12月01日 0 点赞 0 评论 230 浏览 评分:0.0
拆分位数《三位数》 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin>>n; cout<<n%10<…… 题解列表 2024年12月01日 0 点赞 0 评论 682 浏览 评分:0.0
信息学奥赛一本通T1340-扩展二叉树 ????? 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; // 全局变量,存储输入的字符串 string s; // 全局变量,当…… 题解列表 2024年12月01日 0 点赞 0 评论 205 浏览 评分:0.0
信息学奥赛一本通T1260-拦截导弹 摘要:解题思路:注意事项:参考代码:#include"bits/stdc++.h" using namespace std; int main(){ // 定义数组a和b,长度为1100,n初…… 题解列表 2024年12月01日 0 点赞 0 评论 194 浏览 评分:0.0
1151: C语言训练-计算一个整数N的阶乘 摘要:解题思路:注意事项:注意阶乘不要超过20,否则超了LONG LONG的范围参考代码:#include<bits/stdc++.h>using namespace std;int main(){ lon…… 题解列表 2024年12月01日 1 点赞 0 评论 355 浏览 评分:9.9
2000: 偶数列举题解 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n; cin>>n; for(int i=2;i<…… 题解列表 2024年12月01日 1 点赞 0 评论 495 浏览 评分:9.9
编写题解 3010: 奇偶数之和 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,s=0,t=0; cin>>n; for(in…… 题解列表 2024年12月01日 3 点赞 1 评论 316 浏览 评分:9.9