关闭

POJ 2390 Bank Interest(水~)

300人阅读 评论(0) 收藏 举报
分类:

Description
给定利率,本金和年数,求最后的总金额
Input
三个整数a,b,c分别表示利率,本金和年数
Output
输出存c年后的总金额
Sample Input
5 5000 4
Sample Output
6077
Solution
纯净水…
Code

#include<stdio.h>
#include<math.h>

int main()
{
    int a,c,i;
    double b;
    scanf("%d%lf%d",&a,&b,&c);
    b*=pow((1+a/100.0),c);
    printf("%d\n",(int)b);
    return 0;
}
0
0
查看评论

poj 2390 Bank Interest

zuozh有一种回到大一时候的感觉
  • Scythe666
  • Scythe666
  • 2014-08-19 16:16
  • 926

POJ 2390 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 intere...
  • qq_26525215
  • qq_26525215
  • 2015-10-23 18:20
  • 588

POJ 2390 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 inte...
  • forever_kirito
  • forever_kirito
  • 2017-11-19 13:06
  • 78

poj 2390 水题 Bank Interest

#include #include #include using namespace std; int main(){ int r,m,y,t; double sum=0; cin>>r>>m>>y; sum=m*pow((...
  • ChallenChenZhiPeng
  • ChallenChenZhiPeng
  • 2012-06-25 17:21
  • 503

POJ 2390 Bank Interest G++

#include using namespace std; //谢谢博友文章 int main() { double r,m,y; cin>>r>>m>>y; for(int i=0;i<y;i++) { m=m*(1+r/100.00); ...
  • woniupengpeng
  • woniupengpeng
  • 2017-03-28 15:22
  • 90

poj 2390 Bank Interest(计算本利和)

一、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 rat...
  • Insert_day
  • Insert_day
  • 2013-08-03 22:00
  • 593

POJ2390:Bank Interest

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 ...
  • libin56842
  • libin56842
  • 2013-03-11 22:12
  • 1351

POJ2390 Bank Interest【水题】

Bank Interest Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 15929   Accepted: 9556 Description Farmer John made a ...
  • tigerisland45
  • tigerisland45
  • 2017-02-17 19:51
  • 437

POJ 1384 Piggy-Bank(完全背包)

POJ 1384 Piggy-Bank(完全背包) http://poj.org/problem?id=1384 题意: 现在有n种硬币,每种硬币有特定的重量cost[i] 克和它对应的价值val[i]. 每种硬币可以无限使用. 已知现在一个储蓄罐中所有硬币的总重量正好为m克, 问你这...
  • u013480600
  • u013480600
  • 2014-10-25 16:01
  • 1180

poj2390 Bank Interest

题意:输入年利率、金额、年份,输出复利之后能拿到的金额数 注意输出整数计算时中间部分取小数,用double #include #include #include using namespace std; int main(){ int a,b,c; cin>>a>>b...
  • dlutjwh
  • dlutjwh
  • 2016-11-05 00:14
  • 81
    个人资料
    • 访问:546059次
    • 积分:24321
    • 等级:
    • 排名:第322名
    • 原创:1930篇
    • 转载:0篇
    • 译文:0篇
    • 评论:68条
    最新评论