pow默认输出double,如果题目要求整数需要int强制转换 摘要:解题思路:用pow函数的注意是,即使是两个int运算得到的pow结果也默认为double。而题目中要求,给出整数结果,就必须在输出前(int)强制转换。参考代码:#include<iostream>#…… 题解列表 2024年12月02日 0 点赞 0 评论 246 浏览 评分:0.0
新手 乘方计算 摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main(){ int a,b,c; scanf("%d%d",&a,&b); c=pow(a,b); …… 题解列表 2024年12月07日 0 点赞 0 评论 227 浏览 评分:0.0
2805: 乘方计算 快速幂方法 摘要:解题思路: 快速幂注意事项:参考代码:#include <iostream> // #include <sstream> #include <cstdio> // #include <algor…… 题解列表 2023年02月09日 0 点赞 0 评论 311 浏览 评分:0.0
题解 2805: 乘方计算 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a,n; cin>>a>>n; …… 题解列表 2024年01月10日 0 点赞 0 评论 128 浏览 评分:2.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 评论 191 浏览 评分:2.0
乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算乘方计算 摘要:解题思路:注意事项:参考代码:#include <bits/stdc++.h>using namespace std;int main(){ int a,n,sum=1; cin>>a>>…… 题解列表 2024年01月11日 0 点赞 1 评论 138 浏览 评分:2.0
LJX........................................................ 摘要:解题思路:注意事项:参考代码:#include<iostream>using namespace std;int main(){ int n,a,sum=1; cin>>a>>n; …… 题解列表 2023年12月06日 0 点赞 0 评论 119 浏览 评分:6.0
python 2805: 乘方计算 摘要:注意事项:参考代码:a, n = map(int, input().split()) print(a**n)…… 题解列表 2024年03月13日 0 点赞 0 评论 327 浏览 评分:6.0
2805: 乘方计算 摘要:``` #include using namespace std; int main(){ int a,n,sum; cin>>a>>n; sum=1; for(int i=0;…… 题解列表 2023年11月05日 0 点赞 0 评论 195 浏览 评分:7.3
有错误请指出 摘要:解题思路:注意事项:参考代码:#include <stdio.h>int main(){ int a,n; scanf("%d %d",&a,&n); int i=0,cheng=1; …… 题解列表 2022年12月20日 0 点赞 0 评论 539 浏览 评分:9.5