时间限制: 1000 ms 空间限制: 262144 KB 具体限制
按年利率R%存入本钱X,存入P年后的本利合计为Y=X*((100+R)/100)^P,求Y的值。
输入一行三个空格隔开的实数R,X,P
输出收益Y,答案保留两位小数。
1 #include<iostream>
2 #include<cstdio>
3 #include<cmath>
4 using namespace std;
5 double r,x,p;
6 int main()
7 {
8 cin>>r>>x>>p;
9 double a=(100+r)/100;
10 printf("%.2lf",x*pow(a,p));
11 return 0;
12 }
1 100 5
105.10
1<=X<=10000 1<=P,R<=100
、
扫码关注腾讯云开发者
领取腾讯云代金券
Copyright © 2013 - 2025 Tencent Cloud. All Rights Reserved. 腾讯云 版权所有
深圳市腾讯计算机系统有限公司 ICP备案/许可证号:粤B2-20090059 深公网安备号 44030502008569
腾讯云计算(北京)有限责任公司 京ICP证150476号 | 京ICP备11018762号 | 京公网安备号11010802020287
Copyright © 2013 - 2025 Tencent Cloud.
All Rights Reserved. 腾讯云 版权所有