POJ 2390-Bank Interest-水
来源:互联网 发布:雪梨淘宝店衣服质量 编辑:程序博客网 时间:2024/05/21 22:45
Bank Interest
Problem Description
Farmer John made a profit last year! He would like to invest it well but wonders how much money he will make. He knows the interest rate R (an integer between 0 and 20) that is compounded annually at his bank. He has an integer amount of money M in the range 100..1,000,000. He knows how many years Y (range: 0..400) he intends to invest the money in the bank. Help him learn how much money he will have in the future by compounding the interest for each year he saves. Print an integer answer without rounding. Answers for the test data are guaranteed to fit into a signed 32 bit integer.
Input
* Line 1: Three space-separated integers: R, M, and Y
Output
* Line 1: A single integer that is the number of dollars FJ will have after Y years.
Sample Input
5 5000 4
Sample Output
6077
#include<algorithm>#include<iostream>#include<cstdio>#include<cmath>using namespace std;int main(){ int a; double r,m,y; scanf("%lf %lf %lf",&r,&m,&y); a=pow(1+r*0.01,y)*m; printf("%d",a); return 0;}
- POJ 2390-Bank Interest-水
- poj 2390 Bank Interest
- poj 2390 Bank Interest
- POJ 2390 Bank Interest
- POJ 2390 Bank Interest
- POJ 2390 Bank Interest(水~)
- poj 2390 水题 Bank Interest
- poj 2390 Bank Interest(计算本利和)
- POJ 2390 Bank Interest(我的水题之路——double和floa计算差别)
- POJ2390:Bank Interest
- poj2390 Bank Interest
- POJ2390 Bank Interest【水题】
- NUC1373 Bank Interest【水题】
- bzoj1755 [Usaco2005 qua]Bank Interest
- 1755: [Usaco2005 qua]Bank Interest
- bzoj1755 [Usaco2005 qua]Bank Interest
- bzoj1755 [Usaco2005 qua]Bank Interest
- BZOJ 1755 [USACO 2005 Qua] Bank Interest 快速幂
- 0/1背包(回溯法求解)-算法设计与分析
- 趋势科技2016校招:下面程序一共会在屏幕上输出多少个“-” ?
- codeforces 853B 思维 差分
- Python小练习(1)
- 学生选择问题(回溯)-算法设计与分析
- POJ 2390-Bank Interest-水
- 关于maven一些简单的知识
- LeetCode.103 Binary Tree Zigzag Level Order Traversal
- linux双网卡同时访问外网
- 简图记录-linux进程间通信基础
- JDK的安装与环境变量的配置
- http-超文本传输协议之apache
- 再次使用construct 2制作游戏!
- mr refuse connection error