1755: [Usaco2005 qua]Bank Interest

Time Limit: 5 Sec  Memory Limit: 64 MB
Submit: 187  Solved: 162
[Submit][Status][Discuss]

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

INPUT DETAILS:

5% annual interest, 5000 money, 4 years

Sample Output

6077

OUTPUT DETAILS:

Year 1: 1.05 * 5000 = 5250
Year 2: 1.05 * 5250 = 5512.5
Year 3: 1.05 * 5512.50 = 5788.125
Year 4: 1.05 * 5788.125 = 6077.53125
The integer part of 6077.53125 is 6077.

HINT

 

Source

Gold

题解:我猜这个应该是除了1000之外我做过的最水的bzoj题了= =,不用多解释,看看样例就明白怎么回事了

 /**************************************************************
Problem:
User: HansBug
Language: Pascal
Result: Accepted
Time: ms
Memory: kb
****************************************************************/ var l,m,n:longint;
begin
readln(n,m,l);
writeln(trunc(extended(m)*exp(ln((+n)/)*l)));
readln;
end.

1755: [Usaco2005 qua]Bank Interest的更多相关文章

  1. bzoj 1755: [Usaco2005 qua]Bank Interest【模拟】

    原来强行转int可以避免四舍五入啊 #include<iostream> #include<cstdio> using namespace std; int r,y; doub ...

  2. bzoj1755 [Usaco2005 qua]Bank Interest

    Description Farmer John made a profit last year! He would like to invest it well but wonders how muc ...

  3. BZOJ1754: [Usaco2005 qua]Bull Math

    1754: [Usaco2005 qua]Bull Math Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 374  Solved: 227[Submit ...

  4. bzoj1751 [Usaco2005 qua]Lake Counting

    1751: [Usaco2005 qua]Lake Counting Time Limit: 5 Sec  Memory Limit: 64 MB Submit: 168  Solved: 130 [ ...

  5. Bank Interest

    Bank Interest Time Limit : 2000/1000ms (Java/Other)   Memory Limit : 131072/65536K (Java/Other) Tota ...

  6. 1753: [Usaco2005 qua]Who's in the Middle

    1753: [Usaco2005 qua]Who's in the Middle Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 290  Solved:  ...

  7. 1754: [Usaco2005 qua]Bull Math

    1754: [Usaco2005 qua]Bull Math Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 398  Solved: 242[Submit ...

  8. 1751: [Usaco2005 qua]Lake Counting

    1751: [Usaco2005 qua]Lake Counting Time Limit: 5 Sec  Memory Limit: 64 MBSubmit: 190  Solved: 150[Su ...

  9. bzoj3384[Usaco2004 Nov]Apple Catching 接苹果*&&bzoj1750[Usaco2005 qua]Apple Catching*

    bzoj3384[Usaco2004 Nov]Apple Catching 接苹果 bzoj1750[Usaco2005 qua]Apple Catching 题意: 两棵树,每分钟会从其中一棵树上掉 ...

随机推荐

  1. 在ubuntu下增加root用户并登录

    1.打开终端. 2.输入sudo gedit /usr/share/lightdm/lightdm.conf.d/50-ubuntu.conf 3.在弹出的编辑框里输入:greeter-show-ma ...

  2. mongoDB文档操作

    数据库操作无非就是增.删.改.查.这篇主要介绍增.删.改. 1.增 Mongodb插入操作很简单,使用关键字“insert”.实例: > db.test.blog.insert({"h ...

  3. Raphael的鼠标over move out事件

    Raphael的鼠标over move out事件 <%@ page language="java" contentType="text/html; charset ...

  4. CRtmpServer分析与应用

    CRtmpServer分析与应用 官方地址:http://www.rtmpd.com/ CRtmpServer是一款不错的开源流媒体服务器,用c++语言编写,跨平台.官方介绍CRtmpServer不仅 ...

  5. 大咖,我能转行做UX设计师吗?

    前几天,有个朋友找到我,叫我给分析下他适不适合转UX设计.他的专业是建筑设计,之所以要辞职,也就是公司破事多,老板又不看重他.看到UX设计这个行业的前景很不错,想要转行.他说的也没错, 现在的UX设计 ...

  6. 一步一步学Java IO

    1.基本概念 1.1.InputStream 最基本的字节输入流,抽象类,定义了读取原始字节的所有基本方法1.1.1.public abstract int read() throws IOExcep ...

  7. windows环境下使用git客户端、github和tortoisegit管理项目代码

    一.为什么 为什么不用svn? svn是一个优秀的代码和版本管理工具,使用svn只需要搭建好svn中央仓库,配置本地svn客户端即可,自从google code关闭服务之后,互联网上已经没有非常好的公 ...

  8. 开源半成品的Web版工作流模板设计器(基于AngularJS 2和Redux), 还在继续填坑中

    先上个图: 很多企业内部的应用都需要有个工作流平台(插件),无奈灵活方便好用且能够自行更改代码定制嵌入的实在不多,只好自己动手慢慢搞. https://github.com/shibamo/99-fl ...

  9. GTK+基本图元的绘制

    // main.c #include <gtk/gtk.h> static void draw_round_rectangle (cairo_t * cr, double x, doubl ...

  10. 拆开Ceph看队列和线程

    作者:吴香伟 发表于 2017/01/08 版权声明:可以任意转载,转载时务必以超链接形式标明文章原始出处和作者信息以及版权声明 我上小学时家离学校很远,家在某某山脚,学校在镇里.每周回家一趟,周五放 ...