循环+累乘解乘方an 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a=0,n=0; scanf("%d %d",&a,&n…… 题解列表 2025年12月24日 0 点赞 0 评论 67 浏览 评分:0.0
乘方计算题解 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){…… 题解列表 2025年10月29日 1 点赞 0 评论 156 浏览 评分:10.0
新手乘方计算 摘要:# 这里使用的是for循环int main(){ int a = 0;int n = 0; scanf("%d %d", &a, &n); //判断n是否等于0 …… 题解列表 2025年06月16日 0 点赞 0 评论 238 浏览 评分:10.0
新手 乘方计算 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c; scanf("%d%d",&a,&b); c=pow(a,b); …… 题解列表 2024年12月07日 0 点赞 0 评论 338 浏览 评分:0.0
pow默认输出double,如果题目要求整数需要int强制转换 摘要:解题思路:用pow函数的注意是,即使是两个int运算得到的pow结果也默认为double。而题目中要求,给出整数结果,就必须在输出前(int)强制转换。参考代码:#include<iostream>#…… 题解列表 2024年12月02日 0 点赞 0 评论 340 浏览 评分:0.0
超简单新手题解 摘要:解题思路:pow函数注意事项:参考代码:#i#include <stdio.h>int main() { int a,b,j; scanf("%d %d",&a,&b); j=pow(a,b); pr…… 题解列表 2024年11月07日 0 点赞 0 评论 284 浏览 评分:2.0
2805: 乘方计算 摘要:解题思路:注意事项:因为是乘,所以“sum=1”,不是“sum=0”参考代码:#include <bits/stdc++.h>using namespace std;int main(){ in…… 题解列表 2024年06月30日 0 点赞 0 评论 297 浏览 评分:0.0
编写题解 2805: 乘方计算 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a,n,sum=1;cin>>a>>n; …… 题解列表 2024年06月30日 1 点赞 0 评论 436 浏览 评分:9.0
2805: 乘方计算 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ int a,n,sum=1; cin>>a>>n…… 题解列表 2024年06月30日 0 点赞 0 评论 229 浏览 评分:0.0
编写题解 2805: 乘方计算题解 摘要:解题思路:注意事项:参考代码:#include<bits/stdc++.h>using namespace std;int main(){ long long a,n,s=1; cin>>a>>n; …… 题解列表 2024年05月11日 0 点赞 0 评论 231 浏览 评分:0.0